Bug 16803

Summary: Newer Adaptec controllers make system hang with slices ending 1023/255/63
Product: Base System Reporter: Andre Albsmeier <Andre.Albsmeier>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Andre Albsmeier 2000-02-18 12:00:01 UTC
During boot, /sys/i386/isa/diskslice_machdep.c tries to verify in
check_part() that the slice entries in the partition table are somehow
consistent.

If booting verbose an error message is generated if this isn't true. To
provide a possibility to shut up this message, the 1023/255/63 geometry
is always allowed.

If you have entered this 1023/255/63 geometry for the end of a slice,
newer Adaptec controller (e.g. the 2940UW with BIOS 2.20 or the 2940U2W)
will make the system freeze when it should start to load _any_ operating
system.

This is _not_ a FreeBSD problem. It is enough to have any harddisk
containing a slice ending with the above geometry attached to the bus
and have the 'Include in BIOS Scan' entry set to yes in the Adaptec
BIOS to make the system hang.

I could not observe the problem on a 2940UW running BIOS 1.34.3
or on an ASUS P2B-LS with a SCSI BIOS 2.11.

Fix: I don't know why this happens. I assume, that the various boot
codes try to read the disk where slices are ending. For the
faked slice entry, they pass 1023/255/63 to the controller and
make it hang now. Interestingly 1023/254/63 works. This maybe
due to the fact that an ending head entry of 255 means that 256
heads are used. The Adaptec controllers are normally translating
the drives to a 255/63 geometry which would require a 254/63 entry
for the end of the slice. (Who invented this f*cked up spec?!?)

Maybe we should accept the geometry 1023/254/63 as well for
the end of slice entry in /sys/i386/isa/diskslice_machdep.c?
This could be accomplished by this patch:
How-To-Repeat: 
Take a disk and make a slice ending in 1023/255/63. Attach it to
a controller as described above and set the 'Include in BIOS Scan'
entry to yes for this drive. Boot any OS.
Comment 1 Andre Albsmeier 2000-06-14 11:13:21 UTC
Adaptec has released a new version of their BIOS (2.57.2). With
this BIOS, the error can't be reproduced anymore. So the suggestion
in this PR is obsolete but people should note that they will
get problems when using the geometry in question with an Adaptec
BIOS 2.20.

The new BIOS can be found at

ftp://ftp.adaptec.digisle.net/eprom_bios/2940uw_bios_v2572.exe

and

ftp://ftp.adaptec.digisle.net/eprom_bios/2940u2w_bios_v2572.exe

	-Andre
Comment 2 Jacques Vidrine freebsd_committer freebsd_triage 2000-06-14 13:03:27 UTC
State Changed
From-To: open->closed

Closed at request of originator.