From owner-freebsd-current Tue Feb 18 21:52:21 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C10637B401; Tue, 18 Feb 2003 21:52:20 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id B03EA43F85; Tue, 18 Feb 2003 21:52:18 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.6/8.12.5) with ESMTP id h1J5qHnU096459; Tue, 18 Feb 2003 22:52:17 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.6/8.12.5/Submit) id h1J5qHNH096458; Tue, 18 Feb 2003 22:52:17 -0700 (MST) (envelope-from ken) Date: Tue, 18 Feb 2003 22:52:17 -0700 From: "Kenneth D. Merry" To: Thomas Quinot 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> References: <20030214232001.A71462@panzer.kdm.org> <20030215112046.GA20707@melusine.cuivre.fr.eu.org> <20030216224513.A84634@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030216224513.A84634@panzer.kdm.org>; from ken@kdm.org on Sun, Feb 16, 2003 at 10:45:14PM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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