View Single Post
Old 18 October 2012, 18:47   #17
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,869
I still don't see a reason why a (hard drive) file system would need to call TD_GETGEOMETRY. Scsi.device does not even support TD_GETGEOMETRY.

Do these old controllers with crashing drivers support disks bigger than 4GB? If they don't, the discussion is pointless.

IMHO a proper sequence of checks is this:

1. calculate the last block of the partition. If it is inside the first 4GB of the drive, use CMD_READ and CMD_WRITE. No 64 bit or SCSI support needed.

2. call NSCMD_DEVICEQUERY and check the list of supported commands if NSCMD_TD_READ64 and NSCMD_TD_WRITE64 are among them. If they are, use them.

3. if NSCMD_DEVICEQUERY succeeded, check the list of supported commands if TD_READ64 and TD_WRITE64 are among them (unlikely). If so, use them

4. call TD_READ64 with all numbers set to 0. If it returns no error or IOERR_BADLENGTH or IOERR_BADADDRESS, use TD64 commands

5. try to read the last block of the partition with HD_SCSICMD. If it succeeds, use HD_SCSICMD.

6. fail to mount

Depending on experiences during tests, 2. and 4. may be swapped, 3. may be skipped.
thomas is offline  
 
Page generated in 0.04267 seconds with 11 queries