summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-04-27 23:54:45 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-04-27 23:54:45 +0000
commit03832ae83bfefc3dd374b7f4dfccea32b5c66746 (patch)
tree6a73d854878d29a02d7e47ff0d31d443ff8919c9 /sys/scsi
parent3fce0ae35555ddc188283602b48c73d16160cb65 (diff)
Add SDEV_UMASS flag, analogous to SDEV_ATAPI, and use it to force a
full LUN scan on UMASS SCSI targets. UMASS provides reliable max lun information so we shouldn't waste time. Fixes many x-in-1 card reader/writers that report identical INQUIRY information for every slot they provide. Lots of diagnosis and testing by dlg@, ok dlg@, 'I can live with this' marco@.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsiconf.c6
-rw-r--r--sys/scsi/scsiconf.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 3d39c8b7455..e205e35d619 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.92 2004/07/31 11:31:30 krw Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.93 2005/04/27 23:54:44 krw Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -688,7 +688,9 @@ scsi_probedev(scsi, inqbuflun0, target, lun)
bcopy(&inqbuf, inqbuflun0, sizeof *inqbuflun0);
else if (((1 << sc_link->scsibus) & scsiforcelun_buses) &&
((1 << target) & scsiforcelun_targets))
- ;
+ ;
+ else if (sc_link->flags & SDEV_UMASS)
+ ;
else if (memcmp(&inqbuf, inqbuflun0, sizeof inqbuf) == 0) {
/* The device doesn't distinguish between LUNs. */
SC_DEBUG(sc_link, SDEV_DB1, ("IDENTIFY not supported.\n"));
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 4e6b19bf55e..d4469361366 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.50 2005/04/06 02:51:13 krw Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.51 2005/04/27 23:54:44 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -176,6 +176,7 @@ struct scsi_link {
#define SDEV_EJECTING 0x0100 /* eject on device close */
#define SDEV_ATAPI 0x0200 /* device is ATAPI */
#define SDEV_2NDBUS 0x0400 /* device is a 'second' bus device */
+#define SDEV_UMASS 0x0800 /* device is UMASS SCSI */
u_int16_t quirks; /* per-device oddities */
#define SDEV_AUTOSAVE 0x0001 /* do implicit SAVEDATAPOINTER on disconnect */
#define SDEV_NOSYNC 0x0002 /* does not grok SDTR */