From owner-freebsd-scsi Mon Mar 6 8: 7: 2 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from bluebottle.calcaphon.com (calcaphon.demon.co.uk [193.237.19.5]) by hub.freebsd.org (Postfix) with ESMTP id 7289337BBAD for ; Mon, 6 Mar 2000 08:06:35 -0800 (PST) (envelope-from n_hibma@calcaphon.com) Received: from henny.webweaving.org (dhcp36.calcaphon.com [10.0.1.36]) by bluebottle.calcaphon.com (8.9.3/8.9.1) with ESMTP id QAA65870 for ; Mon, 6 Mar 2000 16:07:07 GMT (envelope-from n_hibma@calcaphon.com) Received: from localhost (localhost [127.0.0.1]) by henny.webweaving.org (8.9.3/8.9.3) with ESMTP id PAA00384 for ; Mon, 6 Mar 2000 15:47:21 GMT (envelope-from n_hibma@calcaphon.com) Date: Mon, 6 Mar 2000 15:47:21 +0000 (GMT) From: Nick Hibma X-Sender: n_hibma@localhost Reply-To: Nick Hibma To: FreeBSD SCSI Mailing List Subject: first INQUIRY goes round in circles (fwd) 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 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