Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2003 22:52:17 -0700
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Thomas Quinot <thomas@FreeBSD.ORG>
Cc:        scsi@FreeBSD.ORG, current@FreeBSD.ORG, joe@FreeBSD.ORG
Subject:   Re: call for testers: cd(4) changes
Message-ID:  <20030218225217.A96402@panzer.kdm.org>
In-Reply-To: <20030216224513.A84634@panzer.kdm.org>; from ken@kdm.org on Sun, Feb 16, 2003 at 10:45:14PM -0700
References:  <20030214232001.A71462@panzer.kdm.org> <20030215112046.GA20707@melusine.cuivre.fr.eu.org> <20030216224513.A84634@panzer.kdm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
ken@kdm.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030218225217.A96402>