From owner-freebsd-scsi Mon Mar 6 8:17:53 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id C922B37BDFB for ; Mon, 6 Mar 2000 08:17:49 -0800 (PST) (envelope-from mjacob@feral.com) Received: from semuta.feral.com (semuta [192.67.166.70]) by feral.com (8.9.3/8.9.3) with ESMTP id IAA08566; Mon, 6 Mar 2000 08:17:40 -0800 Date: Mon, 6 Mar 2000 08:17:40 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Nick Hibma Cc: FreeBSD SCSI Mailing List Subject: Re: first INQUIRY goes round in circles (fwd) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Test Unit Ready is mandatory, and that SCSI Floppy is sure busted, but I'm very nervous about this change. If people agree that it should be adopted, let's really wait until after 4.0 is cut, okay? > > The very first command issued by XPT, INQUIRY, goes round in circles if > a drive chooses to not reset a Unit Attention (UA) error. It retries the > INQUIRY command indefinitely (I have no idea why, but my gut feeling is > that somewhere a new INQUIRY command is issued to get some sensible > info from the drive, which then ends up in a loop) > > > The UFI (SCSI derivative) USB device (Y-E Data Flashbuster-U floppy > drive) I have here is broken as it INQUIRY - REQUEST SENSE - INQUIRY > returns the same sense code (sense key = 0x06, asc = 0x29, ascq = 0x00) > again at the second INQUIRY command, because the INQUIRY does not clear > the UA state. > > As this is the very first command tried, it is impossible to use a > device specific quirk. > > I suggest the following patch. It might have the following problems: > > - Test Unit Ready not supported by some devices > - Devices reporting more than 4 UA states (4 is the number of retries > in scsi_inquiry) > > Let me know. > > Nick > > > > =================================================================== > RCS file: /home/ncvs/src/sys/cam/scsi/scsi_all.c,v > retrieving revision 1.14 > diff -u -r1.14 scsi_all.c > --- scsi/scsi_all.c 2000/02/20 04:42:43 1.14 > +++ scsi/scsi_all.c 2000/03/06 12:11:29 > @@ -1045,7 +1045,7 @@ > "Not ready to ready change, medium may have changed") }, > /* DT WR OM */{SST(0x28, 0x01, SS_DEF, > "Import or export element accessed") }, > -/* DTLPWRSOMCAE */{SST(0x29, 0x00, SS_NEDEF|ENXIO, > +/* DTLPWRSOMCAE */{SST(0x29, 0x00, SS_TUR|SSQ_DECREMENT_COUNT|ENXIO, > "Power on, reset, or bus device reset occurred") }, > /* DTLPWRSOMCAE */{SST(0x29, 0x01, SS_DEF, > "Power on occurred") }, > > -- > n_hibma@webweaving.org > n_hibma@freebsd.org USB project > http://www.etla.net/~n_hibma/ > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-scsi" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message