On Sun, Feb 16, 2003 at 22:45:14 -0700, Kenneth D. Merry wrote: > On Sat, Feb 15, 2003 at 12:20:46 +0100, Thomas Quinot wrote: > > Le 2003-02-15, Kenneth D. Merry écrivait : > > > > > - Automatically detect CDROM drives that can't handle 6 byte mode > > > sense and mode select, and adjust our command size accordingly. > > > More information on that below. > > > > > > - MODE_SENSE and MODE_SELECT translation removed in ATAPICAM and in > > > the umass(4) driver, since there's no way for that to work properly > > > (see below). > > > > I'm afraid things are not as simple as that. Unfortunately you cannot > > expect ATAPI drives to properly reject MODE_{SENSE,SELECT}_6 and try the > > _10 variants in that case: the reason why ATAPICAM inconditionnally > > translates the _6 commands into _10 is because some ATAPI drives have > > been found to lock up when they rececive the _6 commands, whereas the > > ATAPI specification only mandates the implementation of the _10 > > versions. > > The translation produces bogus results, so we can't really keep it around. > In the mode sense case, the caller will be looking in the wrong place for > the page. In the mode select page, the drive will be looking for the page > at the wrong offset, and the page will be truncated. > > The two alternatives I can think of are getting the CAM_NEW_TRAN_CODE > working, so we'll know that drives that talk ATAPI can't do 10 byte mode > sense/select, or quirking drives that are known to hang when they get 6 > byte commands. > > The long term plan is the first alternative; that really is the cleanest > way to do it. In the short term, I'll put in a quirk mechanism. I'll be > somewhat strict about making submitters prove that the drive has a > problem, and documenting it in a PR audit trail. (The same sort of > approach Nate is using with the da(4) driver quirks.) We should be able > to remove all drives with the 10 byte quirk once we get the > CAM_NEW_TRAN_CODE done.
I've got a new patchset with the quirk definition and comments in there: http://people.FreeBSD.org/~ken/scsi_cd.cmdsize.20030217 I'm planning to check it in Thursday, assuming I have time. Ken -- Kenneth Merry [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message