summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/umass_scsi.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2004-02-21 00:47:42 +0000
committerkrw <krw@openbsd.org>2004-02-21 00:47:42 +0000
commitf0e7a9c75b45e995788edc2aaeb552da987213f8 (patch)
treed109ffc559a8d04e3f23d9e6fefb509b8fcbb41a /sys/dev/usb/umass_scsi.c
parentCorrectness is also not using err(1, "out of memory") if malloc() (diff)
downloadwireguard-openbsd-f0e7a9c75b45e995788edc2aaeb552da987213f8.tar.xz
wireguard-openbsd-f0e7a9c75b45e995788edc2aaeb552da987213f8.zip
Eliminate the quirks SDEV_NOSTARTUNIT, UMASS_QUIRK_NO_START_STOP, and
UMASS_QUIRK_FORCE_SHORT_INQUIRY. Fixes a bunch of USB devices. Based on work by Mycroft in NetBSD. ok tdeval@ deraadt@.
Diffstat (limited to 'sys/dev/usb/umass_scsi.c')
-rw-r--r--sys/dev/usb/umass_scsi.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c
index dd6d993d132..f7b3a8a6203 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.6 2004/01/14 02:00:41 krw Exp $ */
+/* $OpenBSD: umass_scsi.c,v 1.7 2004/02/21 00:47:42 krw Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -71,8 +71,6 @@ struct umass_scsi_softc {
};
-#define SHORT_INQUIRY_LENGTH 36 /* XXX */
-
#define UMASS_SCSIID_HOST 0x00
#define UMASS_SCSIID_DEVICE 0x01
@@ -224,24 +222,6 @@ umass_scsi_cmd(struct scsi_xfer *xs)
goto done;
}
- if (cmd->opcode == START_STOP &&
- (sc->sc_quirks & UMASS_QUIRK_NO_START_STOP)) {
- xs->error = XS_NOERROR;
- goto done;
- }
-
- if (cmd->opcode == INQUIRY &&
- (sc->sc_quirks & UMASS_QUIRK_FORCE_SHORT_INQUIRY)) {
- /*
- * Some drives wedge when asked for full inquiry
- * information.
- */
- memcpy(&trcmd, cmd, sizeof(trcmd));
- trcmd.bytes[4] = SHORT_INQUIRY_LENGTH;
- cmd = &trcmd;
- xs->datalen = SHORT_INQUIRY_LENGTH;
- }
-
dir = DIR_NONE;
if (xs->datalen) {
switch (xs->flags & (SCSI_DATA_IN | SCSI_DATA_OUT)) {