diff options
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/umass_quirks.c | 30 | ||||
-rw-r--r-- | sys/dev/usb/umass_scsi.c | 22 | ||||
-rw-r--r-- | sys/dev/usb/umassvar.h | 4 |
3 files changed, 17 insertions, 39 deletions
diff --git a/sys/dev/usb/umass_quirks.c b/sys/dev/usb/umass_quirks.c index b3350e69239..1c107d7dc02 100644 --- a/sys/dev/usb/umass_quirks.c +++ b/sys/dev/usb/umass_quirks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass_quirks.c,v 1.9 2004/01/14 02:00:41 krw Exp $ */ +/* $OpenBSD: umass_quirks.c,v 1.10 2004/02/21 00:47:42 krw Exp $ */ /* $NetBSD: umass_quirks.c,v 1.39 2003/05/08 15:19:47 augustss Exp $ */ /* @@ -90,7 +90,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_FUJIPHOTO, USB_PRODUCT_FUJIPHOTO_MASS0100 }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, + 0, PQUIRK_NOTUR | PQUIRK_NOSENSE, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -98,7 +98,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_GENESYS, USB_PRODUCT_GENESYS_GL641USB }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_FORCE_SHORT_INQUIRY | UMASS_QUIRK_NO_START_STOP, + 0, PQUIRK_NOMODESENSE, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -154,7 +154,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_INSYSTEM, USB_PRODUCT_INSYSTEM_USBCABLE }, UMASS_WPROTO_CBI, UMASS_CPROTO_ATAPI, - UMASS_QUIRK_NO_START_STOP, + 0, PQUIRK_NOTUR, UMATCH_VENDOR_PRODUCT, umass_init_insystem, NULL @@ -186,7 +186,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_IOMEGA, USB_PRODUCT_IOMEGA_ZIP250_2 }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, + 0, PQUIRK_NOTUR, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -194,7 +194,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_DUBPXXG }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_FORCE_SHORT_INQUIRY | UMASS_QUIRK_NO_START_STOP, + 0, PQUIRK_NOMODESENSE, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -210,7 +210,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_MINOLTA, USB_PRODUCT_MINOLTA_S304 }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_MAX_LUN | UMASS_QUIRK_NO_START_STOP, + UMASS_QUIRK_NO_MAX_LUN, 0, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -218,7 +218,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_MINOLTA, USB_PRODUCT_MINOLTA_X }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_MAX_LUN | UMASS_QUIRK_NO_START_STOP, + UMASS_QUIRK_NO_MAX_LUN, 0, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -274,7 +274,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_MD1II }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_MAX_LUN | UMASS_QUIRK_NO_START_STOP, + UMASS_QUIRK_NO_MAX_LUN, PQUIRK_NOMODESENSE, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -306,7 +306,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_PEN, USB_PRODUCT_PEN_USBDISK }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_MAX_LUN | UMASS_QUIRK_NO_START_STOP, + UMASS_QUIRK_NO_MAX_LUN, 0, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -346,7 +346,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_EUSB }, UMASS_WPROTO_CBI_I, UMASS_CPROTO_ATAPI, - UMASS_QUIRK_NO_START_STOP, + 0, PQUIRK_NOTUR | PQUIRK_NOSENSE, UMATCH_VENDOR_PRODUCT, umass_init_shuttle, NULL @@ -354,7 +354,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_SHUTTLE, USB_PRODUCT_SHUTTLE_ZIOMMC }, UMASS_WPROTO_CBI_I, UMASS_CPROTO_ATAPI, - UMASS_QUIRK_NO_START_STOP, + 0, PQUIRK_NOTUR, UMATCH_VENDOR_PRODUCT, NULL, NULL @@ -362,7 +362,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_SIIG, USB_PRODUCT_SIIG_MULTICARDREADER }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, + 0, 0, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL,NULL @@ -386,7 +386,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_SONY, USB_PRODUCT_SONY_MSC }, UMASS_WPROTO_CBI, UMASS_CPROTO_UFI, - UMASS_QUIRK_FORCE_SHORT_INQUIRY | UMASS_QUIRK_RS_NO_CLEAR_UA, + UMASS_QUIRK_RS_NO_CLEAR_UA, PQUIRK_NOMODESENSE, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -418,7 +418,7 @@ Static const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_YANO, USB_PRODUCT_YANO_U640MO }, UMASS_WPROTO_CBI_I, UMASS_CPROTO_ATAPI, - UMASS_QUIRK_FORCE_SHORT_INQUIRY, + 0, 0, UMATCH_VENDOR_PRODUCT, NULL, NULL 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)) { diff --git a/sys/dev/usb/umassvar.h b/sys/dev/usb/umassvar.h index e7636bfc4f3..8c023ffdba2 100644 --- a/sys/dev/usb/umassvar.h +++ b/sys/dev/usb/umassvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: umassvar.h,v 1.3 2003/05/17 06:07:57 nate Exp $ */ +/* $OpenBSD: umassvar.h,v 1.4 2004/02/21 00:47:42 krw Exp $ */ /* $NetBSD: umassvar.h,v 1.19 2003/02/22 05:18:50 tsutsui Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>, @@ -178,8 +178,6 @@ struct umass_softc { u_int32_t sc_quirks; #define UMASS_QUIRK_RS_NO_CLEAR_UA 0x00000002 -#define UMASS_QUIRK_NO_START_STOP 0x00000004 -#define UMASS_QUIRK_FORCE_SHORT_INQUIRY 0x00000008 #define UMASS_QUIRK_WRONG_CSWSIG 0x00000010 #define UMASS_QUIRK_NO_MAX_LUN 0x00000020 #define UMASS_QUIRK_WRONG_CSWTAG 0x00000040 |