summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/umass_scsi.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2004-01-14 02:00:41 +0000
committerkrw <krw@openbsd.org>2004-01-14 02:00:41 +0000
commit4147c8c3dd12c672c063f67d9e32faa63eae9ea7 (patch)
tree87354d9deeab311875be42a8cc278852bfec7c0f /sys/dev/usb/umass_scsi.c
parentRevert previous; this will cause issues on some machines, says drahn@ (diff)
downloadwireguard-openbsd-4147c8c3dd12c672c063f67d9e32faa63eae9ea7.tar.xz
wireguard-openbsd-4147c8c3dd12c672c063f67d9e32faa63eae9ea7.zip
Nuke SDEV_NOLUNS, SDEV_FORCELUNS, and PQUIRK_FORCELUNS quirks. Also
moreluns field in scsi_link structure. Instead, treat an INQUIRY result that duplicates the INQUIRY result of LUN 0 as proof the LUN does not exist. Compensate for lack of SDEV_NOLUNS where necessary by setting sc_link->luns to 1, which has the same effect. From Marco Peereboom. Don't issue Test Unit Ready command before INQUIRY command - not necessary and potentially harmful to devices with ADEV_NOTUR quirk since quirks have not been set yet. From mycroft@NetBSD ok deraadt@, mvme* changes by miod@.
Diffstat (limited to 'sys/dev/usb/umass_scsi.c')
-rw-r--r--sys/dev/usb/umass_scsi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c
index 3fed7806119..dd6d993d132 100644
--- a/sys/dev/usb/umass_scsi.c
+++ b/sys/dev/usb/umass_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass_scsi.c,v 1.5 2004/01/10 09:10:51 grange Exp $ */
+/* $OpenBSD: umass_scsi.c,v 1.6 2004/01/14 02:00:41 krw Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -126,8 +126,8 @@ umass_atapi_attach(struct umass_softc *sc)
scbus = umass_scsi_setup(sc);
scbus->sc_link.adapter_target = UMASS_SCSIID_HOST;
scbus->sc_link.luns = 1;
+ scbus->sc_link.openings = 1;
scbus->sc_link.flags |= SDEV_ATAPI;
- scbus->sc_link.quirks |= SDEV_NOLUNS;
scbus->sc_link.device = &umass_atapiscsi_dev;
DPRINTF(UDMASS_USB, ("%s: umass_attach_bus: ATAPI\n"
@@ -161,7 +161,6 @@ umass_scsi_setup(struct umass_softc *sc)
/* Fill in the link. */
scbus->sc_link.adapter_buswidth = 2;
- scbus->sc_link.openings = 1;
scbus->sc_link.adapter = &scbus->sc_adapter;
scbus->sc_link.adapter_softc = sc;
scbus->sc_link.openings = 1;