From owner-freebsd-current Tue Aug 20 19:17: 6 2002 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 A397137B400; Tue, 20 Aug 2002 19:17:01 -0700 (PDT) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4229343E4A; Tue, 20 Aug 2002 19:16:59 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.5/8.12.5) with ESMTP id g7L2GbKD099058; Tue, 20 Aug 2002 20:16:37 -0600 (MDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.5/8.12.5/Submit) id g7L2GbTm099057; Tue, 20 Aug 2002 20:16:37 -0600 (MDT) (envelope-from ken) Date: Tue, 20 Aug 2002 20:16:36 -0600 From: "Kenneth D. Merry" To: Thomas Quinot Cc: Nate Lawson , scsi@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Proliferating quirk table entries Message-ID: <20020820201636.A99025@panzer.kdm.org> References: <20020821024614.A722@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: <20020821024614.A722@melusine.cuivre.fr.eu.org>; from thomas@cuivre.fr.eu.org on Wed, Aug 21, 2002 at 02:46:14AM +0200 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 Wed, Aug 21, 2002 at 02:46:14 +0200, Thomas Quinot wrote: > Le 2002-08-17, Nate Lawson écrivait : > > > I'm working on cleaning up quirk entries in scsi_da.c, especially ones > > related to READ/WRITE 6->10 escalation. For those just joining in, there > > is a function (cmd6workaround) that handles a R/W6 error by translating > > the cdb to 10 bytes and restarting it. > > It might be worthwhile moving this to some generic part in the CAM > framework, instead of having it in the da driver. Similar promotion > is performed for some commands (MODE_{SELECT,SENSE}_6 as well as > {READ,WRITE}_6) in a rather ad hoc fashion in atapi-cam. At least > the cmd6workaround function should be factored in some way; as for the > try 6 -> fail -> retry 10 process, however, I am not sure this can > be readily generalised to ATAPI devices (which are explicitly specified > to only support the _10 variants) as these tend to have very strange > reactions to CDBs they cannot handle properly. The right way to handle the 6/10 byte stuff is to have it be a function of the transport type (see the CAM_NEW_TRAN_CODE stuff). The peripheral drivers and userland applications can query the transport type and send 6 or 10 byte commands as appropriate. If we're going to come up with a generic solution, that's probably the direction we need to be heading. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message