From de88b69b7bf2d167e638d6e24d4271952084016f Mon Sep 17 00:00:00 2001 From: mycroft Date: Mon, 8 Sep 2003 19:30:59 +0000 Subject: [PATCH] Remove UMASS_QUIRK_NO_START_STOP and UMASS_QUIRK_NO_MAX_LUN. --- sys/dev/usb/umass.c | 7 ++-- sys/dev/usb/umass_quirks.c | 72 +++++--------------------------------- sys/dev/usb/umass_scsipi.c | 11 ++---- sys/dev/usb/umassvar.h | 12 +++---- 4 files changed, 18 insertions(+), 84 deletions(-) diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index c16dee82198b..6f3073dd9c9e 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass.c,v 1.97 2003/09/04 00:02:59 mycroft Exp $ */ +/* $NetBSD: umass.c,v 1.98 2003/09/08 19:30:59 mycroft Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide , * Nick Hibma @@ -94,7 +94,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.97 2003/09/04 00:02:59 mycroft Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.98 2003/09/08 19:30:59 mycroft Exp $"); #include "atapibus.h" #include "scsibus.h" @@ -439,8 +439,7 @@ USB_ATTACH(umass) /* * Get the maximum LUN supported by the device. */ - if (sc->sc_wire == UMASS_WPROTO_BBB && - !(sc->sc_quirks & UMASS_QUIRK_NO_MAX_LUN)) { + if (sc->sc_wire == UMASS_WPROTO_BBB) { err = umass_bbb_get_max_lun(sc, &sc->maxlun); if (err) { printf("%s: unable to get Max Lun: %s\n", diff --git a/sys/dev/usb/umass_quirks.c b/sys/dev/usb/umass_quirks.c index 1c3e4db544d0..8211dc7eca54 100644 --- a/sys/dev/usb/umass_quirks.c +++ b/sys/dev/usb/umass_quirks.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass_quirks.c,v 1.48 2003/09/08 16:06:57 tron Exp $ */ +/* $NetBSD: umass_quirks.c,v 1.49 2003/09/08 19:31:00 mycroft Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.48 2003/09/08 16:06:57 tron Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.49 2003/09/08 19:31:00 mycroft Exp $"); #include #include @@ -61,17 +61,9 @@ Static void umass_fixup_sony(struct umass_softc *); Static void umass_fixup_yedata(struct umass_softc *); Static const struct umass_quirk umass_quirks[] = { - { { USB_VENDOR_ACDC, USB_PRODUCT_ACDC_PEN }, - UMASS_WPROTO_BBB, UMASS_CPROTO_SCSI, - UMASS_QUIRK_NO_START_STOP, - 0, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL, NULL - }, - { { 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 @@ -79,7 +71,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 @@ -104,23 +96,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, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL, NULL - }, - - { { USB_VENDOR_MINOLTA, USB_PRODUCT_MINOLTA_S304 }, - UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, - 0, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL, NULL - }, - - { { USB_VENDOR_MINOLTA, USB_PRODUCT_MINOLTA_X }, - UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, + UMASS_QUIRK_FORCE_SHORT_INQUIRY, 0, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL @@ -166,14 +142,6 @@ Static const struct umass_quirk umass_quirks[] = { NULL, NULL }, - { { USB_VENDOR_ONSPEC, USB_PRODUCT_ONSPEC_MD1II }, - UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, - 0, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL, NULL - }, - { { USB_VENDOR_PEN, USB_PRODUCT_PEN_MOBILEDRIVE }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, 0, @@ -182,14 +150,6 @@ Static const struct umass_quirk umass_quirks[] = { NULL, NULL }, - { { USB_VENDOR_PEN, USB_PRODUCT_PEN_USBDISK }, - UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, - 0, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL, NULL - }, - { { USB_VENDOR_PILOTECH, USB_PRODUCT_PILOTECH_CRW600 }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, 0, @@ -224,7 +184,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, UMATCH_VENDOR_PRODUCT, umass_init_shuttle, NULL @@ -232,28 +192,12 @@ 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 }, - { { USB_VENDOR_SIIG, USB_PRODUCT_SIIG_UISDMC2S }, - UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, - 0, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL,NULL - }, - - { { USB_VENDOR_SIIG, USB_PRODUCT_SIIG_MULTICARDREADER }, - UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_NO_START_STOP, - 0, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL,NULL - }, - { { USB_VENDOR_SONY, USB_PRODUCT_SONY_DSC }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, 0, @@ -296,7 +240,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, + UMASS_QUIRK_FORCE_SHORT_INQUIRY, 0, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL diff --git a/sys/dev/usb/umass_scsipi.c b/sys/dev/usb/umass_scsipi.c index 9ea03006286b..0c833ec5019d 100644 --- a/sys/dev/usb/umass_scsipi.c +++ b/sys/dev/usb/umass_scsipi.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */ +/* $NetBSD: umass_scsipi.c,v 1.10 2003/09/08 19:31:00 mycroft Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.10 2003/09/08 19:31:00 mycroft Exp $"); #include "atapibus.h" #include "scsibus.h" @@ -290,13 +290,6 @@ umass_scsipi_request(struct scsipi_channel *chan, /* XXX should use transform */ - if (cmd->opcode == START_STOP && - (sc->sc_quirks & UMASS_QUIRK_NO_START_STOP)) { - /*printf("%s: START_STOP\n", USBDEVNAME(sc->sc_dev));*/ - xs->error = XS_NOERROR; - goto done; - } - if (cmd->opcode == INQUIRY && (sc->sc_quirks & UMASS_QUIRK_FORCE_SHORT_INQUIRY)) { /* diff --git a/sys/dev/usb/umassvar.h b/sys/dev/usb/umassvar.h index 62a60c19355d..1aa17430fa64 100644 --- a/sys/dev/usb/umassvar.h +++ b/sys/dev/usb/umassvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: umassvar.h,v 1.19 2003/02/22 05:18:50 tsutsui Exp $ */ +/* $NetBSD: umassvar.h,v 1.20 2003/09/08 19:31:01 mycroft Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide , * Nick Hibma @@ -176,12 +176,10 @@ struct umass_softc { #define UMASS_CPROTO_ISD_ATA 5 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 +#define UMASS_QUIRK_RS_NO_CLEAR_UA 0x00000001 +#define UMASS_QUIRK_FORCE_SHORT_INQUIRY 0x00000002 +#define UMASS_QUIRK_WRONG_CSWSIG 0x00000004 +#define UMASS_QUIRK_WRONG_CSWTAG 0x00000008 u_int32_t sc_busquirks;