From owner-freebsd-hackers Fri Feb 8 10:59:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from alicia.nttmcl.com (alicia.nttmcl.com [216.69.69.10]) by hub.freebsd.org (Postfix) with ESMTP id 6000E37B400; Fri, 8 Feb 2002 10:59:40 -0800 (PST) Received: (from gene@localhost) by alicia.nttmcl.com (8.10.1/8.10.1) id g18Ix7M07563; Fri, 8 Feb 2002 10:59:07 -0800 (PST) Date: Fri, 8 Feb 2002 10:59:07 -0800 From: "Eugene M. Kim" To: Terry Lambert Cc: G?rard Roudier , Josef Karthauser , Oliver Fromme , FreeBSD Hardware Mailing List , FreeBSD Hackers Mailing List Subject: Re: USB "Memorybird" quirks Message-ID: <20020208105907.A20197@alicia.nttmcl.com> References: <20020207193911.U1513-100000@gerard> <3C64196C.CC0318FD@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <3C64196C.CC0318FD@mindspring.com>; from tlambert2@mindspring.com on Fri, Feb 08, 2002 at 10:31:08AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG There is hardly a performance issue about 10-byte READ, considering the size of a whole transaction (command + transfer) is at least as large as a disk sector (512 bytes on most modern drives); a four-byte difference is almost nothing here. IMHO the best way is to `try a 10-byte READ first, and if it fails then fallback to a 6-byte READ.' Eugene On Fri, Feb 08, 2002 at 10:31:08AM -0800, Terry Lambert wrote: > > > Gérard Roudier wrote: > > A couple of READ/WRITE 6 byte commands are still mandatory for SCSI block > > devices in order to accomodate softwares as boot software for example that > > may not be upgradable on systems still in use. > > Not a real problem, since if the device doesn't support > the 5 byte commands, it's not booting with the legacy > system software anyway, since you can't boot legacy stuff > on it. > > > > Softwares that are > > maintained should no longer use 6 byte commands, but use the 10 byte > > commands replacement (for years...). > > This I don't understand. FreeBSD appears to have a > preference for the 6 byte commands in the drivers, > which are only used after boot. > > Further, it makes sense that you'd prefer 6 byte if > you could, since it makes your commands 60% smaller, > which should make them faster. > > > > So, unless we want to accomodate applications that still may send 6 byte > > commands through passthrough driver, no translator should be needed. Just > > make class drivers use 10 byte commands instead. > > There has to be a reason that FreeBSD has a preference > for 6 bytes in the CAM code... ?!? > > > > OTOH, using 6 byte READ/WRITE commands is very restrictive if we ever want > > to implemement kind of trustable disk write caching support since they do > > not allow to selectively force media access (this is achieved by the FUA > > bit in >= 10 byte READ/WRITE command). > > > > As a result, no device should be quirked nowadays as failing READ/WRITE 6 > > byte commands. Just maintained softwares should get rid of those commands > > asap. > > It sounds like devices that only support 6 byte commands > are the ones that need quirked? > > In other words, you're just reversing the default and > the fallback positions. > > I think auto-detecting the quirk is still a good bet, > even in the 6 byte only case, just as it would have > been in the 10 byte only case. > > Thanks for the info on what's supposed to be done going > forward, though. If there's no performance issue with > 10 byte commands, inverting the default and the quirk > handling in the failure case seems to be the right thing > to do. > > -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message