From owner-freebsd-scsi Sun Feb 16 21:45:20 2003 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F16837B401; Sun, 16 Feb 2003 21:45:18 -0800 (PST) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 095D843F85; Sun, 16 Feb 2003 21:45:17 -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 h1H5jEnU084717; Sun, 16 Feb 2003 22:45:14 -0700 (MST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.6/8.12.5/Submit) id h1H5jEHa084716; Sun, 16 Feb 2003 22:45:14 -0700 (MST) (envelope-from ken) Date: Sun, 16 Feb 2003 22:45:14 -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: <20030216224513.A84634@panzer.kdm.org> References: <20030214232001.A71462@panzer.kdm.org> <20030215112046.GA20707@melusine.cuivre.fr.eu.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: <20030215112046.GA20707@melusine.cuivre.fr.eu.org>; from thomas@FreeBSD.ORG on Sat, Feb 15, 2003 at 12:20:46PM +0100 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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. > > - The media validation routine also reads the table of contents off > > the drive. > > Great! That could also allow the creation of per-track /dev nodes, as > acd has. Yep. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message