Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Exorcise UMASS_QUIRK_FORCE_SHORT_INQUIRY.



details:   https://anonhg.NetBSD.org/src/rev/b8e4540bfb7f
branches:  trunk
changeset: 551664:b8e4540bfb7f
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Wed Sep 10 05:25:44 2003 +0000

description:
Exorcise UMASS_QUIRK_FORCE_SHORT_INQUIRY.

diffstat:

 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(-)

diffs (115 lines):

diff -r 41d46c0059b4 -r b8e4540bfb7f sys/dev/usb/umass_quirks.c
--- a/sys/dev/usb/umass_quirks.c        Wed Sep 10 05:25:22 2003 +0000
+++ b/sys/dev/usb/umass_quirks.c        Wed Sep 10 05:25:44 2003 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
 #include <sys/systm.h>
@@ -92,15 +92,6 @@
          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 @@
 
        { { 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 -r 41d46c0059b4 -r b8e4540bfb7f sys/dev/usb/umass_scsipi.c
--- a/sys/dev/usb/umass_scsipi.c        Wed Sep 10 05:25:22 2003 +0000
+++ b/sys/dev/usb/umass_scsipi.c        Wed Sep 10 05:25:44 2003 +0000
@@ -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 <sys/cdefs.h>
-__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 @@
                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 -r 41d46c0059b4 -r b8e4540bfb7f sys/dev/usb/umassvar.h
--- a/sys/dev/usb/umassvar.h    Wed Sep 10 05:25:22 2003 +0000
+++ b/sys/dev/usb/umassvar.h    Wed Sep 10 05:25:44 2003 +0000
@@ -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 <bishop%rr.iij4u.or.jp@localhost>,
  *                   Nick Hibma <n_hibma%freebsd.org@localhost>
@@ -176,9 +176,8 @@
 #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;
 



Home | Main Index | Thread Index | Old Index