From owner-freebsd-scsi Thu Feb 21 14:28:48 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id 7B32937B404 for ; Thu, 21 Feb 2002 14:28:43 -0800 (PST) Received: from gateway.posi.net ([12.236.90.177]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020221222843.CGSF1147.rwcrmhc52.attbi.com@gateway.posi.net>; Thu, 21 Feb 2002 22:28:43 +0000 Received: from localhost (kbyanc@localhost) by gateway.posi.net (8.11.6/8.11.6) with ESMTP id g1LMSfF89134; Thu, 21 Feb 2002 14:28:42 -0800 (PST) (envelope-from kbyanc@posi.net) X-Authentication-Warning: gateway.posi.net: kbyanc owned process doing -bs Date: Thu, 21 Feb 2002 14:28:41 -0800 (PST) From: Kelly Yancey To: Joerg Wunsch Cc: =?iso-8859-1?Q?G=E9rard_Roudier?= , Subject: Re: RBC support patch In-Reply-To: <20020221225224.B34036@uriah.heep.sax.de> Message-ID: <20020221140554.N89039-100000@gateway.posi.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE 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 Thu, 21 Feb 2002, Joerg Wunsch wrote: > As G=E9rard Roudier wrote: > > > My understanding is that WRITE(10) is just meaningless for read-only > > devices, thus optionnal. But this is not worded this way in the > > specs. > > Yep, i thought so, too, after reading the specs a bit more carefully. > -- > cheers, J"org .-.-. --... ...-- -.. . DL8DTL I stand corrected: READ(6) and READ(10) are both mandatory in SCSI2. I j= ust eyeballed the WRITE commands (which are both optional) and assumed that applied to READ also. But on second intespection, I see that you are corre= ct. Nonetheless, per Justin's suggestion, I am preparing patches to convert 6 b= yte commands to 10 byte once a device returns 'command not supported' for the 6 byte version. Per recent discussion, I may try and implement 10 to 6 conversion that ma= y be used if the command the DPO, FUA, and RelAdr bits are clear, the transfe= r length is under 256 blocks, and the LBA fits in 21 bits. In which case, if a READ(10) fails, it can fall back to READ(6) (assuming a 6 byte read hasn'= t already failed). In which case, we can determine which size we prefer to t= ry first based on SCSI revision (>=3D2 try 10 byte commands first, <2 try 6 by= te commands first) with fallback should that fail. But note that while 6 to 10 appears fairly straightforward, currently I am only considering converting 10 byte reads to 6 byte reads right now. I'm not too comfortabl= e about the number of restrictions involved to downgrade a later command set = to an earlier one (as demonstrated by the READ criteria I listed above). This is all getting a bit more complicated than I had originally planned. Still doable, it's just going to take me a little longer. Please hold off = on suggesting any more cases/features until I post patches. :) Thanks, Kelly kbyanc@{posi.net,FreeBSD.org} To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message