Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Set the REQUEST SENSE command length to 12 for A...



details:   https://anonhg.NetBSD.org/src/rev/992296507fda
branches:  trunk
changeset: 553449:992296507fda
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Thu Oct 16 23:39:40 2003 +0000

description:
Set the REQUEST SENSE command length to 12 for ATAPI, too.  (UFI and ATAPI are
really the same...)

Fixes problems with Sony Vaio memory stick slots, which advertise themselves as
"ATAPI over CBI".

Remove the quirk for Fuji cameras, since this is almost certainly the same bug.

diffstat:

 sys/dev/usb/umass_quirks.c |  12 ++----------
 sys/dev/usb/umass_scsipi.c |  12 +++++++-----
 2 files changed, 9 insertions(+), 15 deletions(-)

diffs (66 lines):

diff -r 0113030252c4 -r 992296507fda sys/dev/usb/umass_quirks.c
--- a/sys/dev/usb/umass_quirks.c        Thu Oct 16 22:56:29 2003 +0000
+++ b/sys/dev/usb/umass_quirks.c        Thu Oct 16 23:39:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umass_quirks.c,v 1.59 2003/10/16 20:01:06 mycroft Exp $        */
+/*     $NetBSD: umass_quirks.c,v 1.60 2003/10/16 23:39:40 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.59 2003/10/16 20:01:06 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.60 2003/10/16 23:39:40 mycroft Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -60,14 +60,6 @@
 Static void umass_fixup_sony(struct umass_softc *);
 
 Static const struct umass_quirk umass_quirks[] = {
-       { { USB_VENDOR_FUJIPHOTO, USB_PRODUCT_FUJIPHOTO_MASS0100 },
-         UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
-         0,
-         PQUIRK_NOSENSE,
-         UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO,
-         NULL, NULL
-       },
-
        { { USB_VENDOR_INSYSTEM, USB_PRODUCT_INSYSTEM_USBCABLE },
          UMASS_WPROTO_CBI, UMASS_CPROTO_ATAPI,
          0,
diff -r 0113030252c4 -r 992296507fda sys/dev/usb/umass_scsipi.c
--- a/sys/dev/usb/umass_scsipi.c        Thu Oct 16 22:56:29 2003 +0000
+++ b/sys/dev/usb/umass_scsipi.c        Thu Oct 16 23:39:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umass_scsipi.c,v 1.17 2003/10/13 01:47:55 dyoung Exp $ */
+/*     $NetBSD: umass_scsipi.c,v 1.18 2003/10/16 23:39:40 mycroft Exp $        */
 
 /*
  * Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.17 2003/10/13 01:47:55 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.18 2003/10/16 23:39:40 mycroft Exp $");
 
 #include "atapibus.h"
 #include "scsibus.h"
@@ -474,9 +474,11 @@
                    SCSI_CMD_LUN_SHIFT;
                scbus->sc_sense_cmd.length = sizeof(xs->sense);
 
-               cmdlen = sizeof(scbus->sc_sense_cmd);
-               if (sc->sc_cmd == UMASS_CPROTO_UFI) /* XXX */
-                       cmdlen = UFI_COMMAND_LENGTH;
+               if (sc->sc_cmd == UMASS_CPROTO_UFI ||
+                   sc->sc_cmd == UMASS_CPROTO_ATAPI)
+                       cmdlen = UFI_COMMAND_LENGTH;    /* XXX */
+               else
+                       cmdlen = sizeof(scbus->sc_sense_cmd);
                sc->sc_methods->wire_xfer(sc, periph->periph_lun,
                                          &scbus->sc_sense_cmd, cmdlen,
                                          &xs->sense, sizeof(xs->sense),



Home | Main Index | Thread Index | Old Index