From owner-cvs-all Tue Apr 9 0:18: 5 2002 Delivered-To: cvs-all@freebsd.org Received: from van-laarhoven.org (ap-z-5ab8.adsl.wanadoo.nl [212.129.218.184]) by hub.freebsd.org (Postfix) with SMTP id EA0E937B417 for ; Tue, 9 Apr 2002 00:17:50 -0700 (PDT) Received: (qmail 21452 invoked from network); 9 Apr 2002 07:17:49 -0000 Received: from heather.van-laarhoven.org (10.66.0.2) by uitsmijter.van-laarhoven.org with SMTP; 9 Apr 2002 07:17:49 -0000 Date: Tue, 9 Apr 2002 09:17:49 +0200 (CEST) From: Nick Hibma To: Hidetoshi Shimokawa Cc: Josef Karthauser , Hidetoshi Shimokawa , "cvs-committers@FreeBSD.org" , "cvs-all@FreeBSD.org" Subject: Re: cvs commit: src/sys/cam/scsi scsi_all.c scsi_da.c In-Reply-To: Message-ID: <20020409091528.Q374-100000@heather.van-laarhoven.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The umass driver returns the error just fine. See many postings on this in the appropriate mailing lists. The correct thing to do is to pass up the NO_6_BYTE_COMMANDS quirk from the driver to the CAM layer. At the moment the 6 byte commands are converted inside the umass driver to their 10 byte equivalents, so there should be no need for your patch in the first place (apart from the T_RBC bits of course, which looks like a good thing to me). Nick On Mon, 8 Apr 2002, Hidetoshi Shimokawa wrote: > At Mon, 8 Apr 2002 10:55:21 +0100, > Josef Karthauser wrote: > > > > On Mon, Apr 08, 2002 at 01:44:16AM -0700, Hidetoshi Shimokawa wrote: > > > simokawa 2002/04/08 01:44:16 PDT > > > > > > Modified files: (Branch: RELENG_4) > > > sys/cam/scsi scsi_all.c scsi_da.c > > > Log: > > > MFC: > > > - Add support for Simplified Direct Access Device. > > > - Automatically detect devices that do not support READ(6)/WRITE(6). > > > > > > scsi_all.c: rev. 1.29 > > > scsi_da.c: rev. 1.98, 1.101 > > > > Does this mean that the usb umass quirks can be removed? > > If the device returns SCSI error (illegal request), > it can be removed. But if it returns no error, you have to do > sysctl kern.cam.da.no_6_byte=1 or keep the quirks or > enable ad-hoc workaround (the follwing patch). > Justin ask me to disable this part until he looks into the umass-sim. > > As far as I know umass-sim doesn't return any error for the > most of the drives. I think umass-sim should be return some errors > if tranfer length is 0. > > > /\ Hidetoshi Shimokawa > \/ simokawa@sat.t.u-tokyo.ac.jp > PGP public key: http://www.sat.t.u-tokyo.ac.jp/~simokawa/pgp.html > > > Index: scsi_da.c > =================================================================== > RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v > retrieving revision 1.102 > diff -u -r1.102 scsi_da.c > --- scsi_da.c 31 Mar 2002 22:28:03 -0000 1.102 > +++ scsi_da.c 8 Apr 2002 12:16:35 -0000 > @@ -1402,7 +1402,7 @@ > bp->bio_error = 0; > if (bp->bio_resid != 0) { > /* Short transfer ??? */ > -#if 0 > +#if 1 > if (cmd6workaround(done_ccb) > == ERESTART) > return; > @@ -1422,7 +1422,7 @@ > bp->bio_resid = csio->resid; > if (csio->resid > 0) { > /* Short transfer ??? */ > -#if 0 /* XXX most of the broken umass devices need this ad-hoc work around */ > +#if 1 /* XXX most of the broken umass devices need this ad-hoc work around */ > if (cmd6workaround(done_ccb) == ERESTART) > return; > #endif > > > -- n_hibma@van-laarhoven.org http://www.van-laarhoven.org/ n_hibma@FreeBSD.org http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message