From 9c39f1d6a56bab006976640e5c3d78dd6a280696 Mon Sep 17 00:00:00 2001 From: mycroft Date: Wed, 10 Sep 2003 05:25:44 +0000 Subject: [PATCH] Exorcise UMASS_QUIRK_FORCE_SHORT_INQUIRY. --- sys/dev/usb/umass_quirks.c | 23 +++-------------------- sys/dev/usb/umass_scsipi.c | 18 ++---------------- sys/dev/usb/umassvar.h | 7 +++---- 3 files changed, 8 insertions(+), 40 deletions(-) diff --git a/sys/dev/usb/umass_quirks.c b/sys/dev/usb/umass_quirks.c index 3b2e8ba07660..20949277232b 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.53 2003/09/10 03:13:53 mycroft Exp $ */ +/* $NetBSD: umass_quirks.c,v 1.54 2003/09/10 05:25:44 mycroft Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.53 2003/09/10 03:13:53 mycroft Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.54 2003/09/10 05:25:44 mycroft Exp $"); #include #include @@ -92,15 +92,6 @@ Static const struct umass_quirk umass_quirks[] = { NULL, NULL }, - - { { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_DUBPXXG }, - UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_FORCE_SHORT_INQUIRY, - 0, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL, NULL - }, - { { USB_VENDOR_OLYMPUS, USB_PRODUCT_OLYMPUS_C1 }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, UMASS_QUIRK_WRONG_CSWSIG, @@ -143,19 +134,11 @@ 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 }, - - { { USB_VENDOR_GENESYS,USB_PRODUCT_GENESYS_GL641USB }, - UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, - UMASS_QUIRK_FORCE_SHORT_INQUIRY, - 0, - UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, - NULL, NULL - }, }; const struct umass_quirk * diff --git a/sys/dev/usb/umass_scsipi.c b/sys/dev/usb/umass_scsipi.c index 2f703b71ce5c..f103116a74ae 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.11 2003/09/10 02:49:19 mycroft Exp $ */ +/* $NetBSD: umass_scsipi.c,v 1.12 2003/09/10 05:25:44 mycroft Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.11 2003/09/10 02:49:19 mycroft Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.12 2003/09/10 05:25:44 mycroft Exp $"); #include "atapibus.h" #include "scsibus.h" @@ -288,20 +288,6 @@ umass_scsipi_request(struct scsipi_channel *chan, cmd = xs->cmd; cmdlen = xs->cmdlen; - /* XXX should use transform */ - - 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->xs_control & diff --git a/sys/dev/usb/umassvar.h b/sys/dev/usb/umassvar.h index a30d23dcbae8..c09b77d4a7c8 100644 --- a/sys/dev/usb/umassvar.h +++ b/sys/dev/usb/umassvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: umassvar.h,v 1.21 2003/09/10 02:49:19 mycroft Exp $ */ +/* $NetBSD: umassvar.h,v 1.22 2003/09/10 05:25:44 mycroft Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide , * Nick Hibma @@ -176,9 +176,8 @@ struct umass_softc { #define UMASS_CPROTO_ISD_ATA 5 u_int32_t sc_quirks; -#define UMASS_QUIRK_FORCE_SHORT_INQUIRY 0x00000001 -#define UMASS_QUIRK_WRONG_CSWSIG 0x00000002 -#define UMASS_QUIRK_WRONG_CSWTAG 0x00000004 +#define UMASS_QUIRK_WRONG_CSWSIG 0x00000001 +#define UMASS_QUIRK_WRONG_CSWTAG 0x00000002 u_int32_t sc_busquirks;