diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-03-14 22:46:48 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2004-03-14 22:46:48 +0000 |
commit | 555a2250638146792f70ed607cd466e449481d6a (patch) | |
tree | 724365dc29ac1855388ff972379c88fc7c17aacc | |
parent | 8938c44ffa7a4493dbe591b90bb25a7dd182f5c9 (diff) |
Last pre-3.5 tweak: restore bus scanning to full speed by not performing
double INQURY commands on LUNs that will be skipped anyway.
From Marco Peereboom.
ok deraadt@.
-rw-r--r-- | sys/scsi/scsi_base.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 5e8a6a8adaa..05f83ce02dd 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.54 2004/02/21 00:47:42 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.55 2004/03/14 22:46:47 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -324,6 +324,19 @@ scsi_inquire(sc_link, inqbuf, flags) * as we can handle or as much as it has, whichever is less. */ if (!error && inqbuf->additional_length > SID_SCSI2_ALEN) { + switch (inqbuf->device & SID_QUAL) { + case SID_QUAL_RSVD: + case SID_QUAL_BAD_LU: + case SID_QUAL_LU_OFFLINE: + return (0); + case SID_QUAL_LU_OK: + if ((inqbuf->device & SID_TYPE) == T_NODEVICE) + return (0); + break; + default: + break; + } + scsi_cmd.length = min(sizeof(struct scsi_inquiry_data), SID_INQUIRY_HDR + inqbuf->additional_length); error = scsi_scsi_cmd(sc_link, (struct scsi_generic *)&scsi_cmd, |