Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Add quirk for devices without Get Max Lun.



details:   https://anonhg.NetBSD.org/src/rev/e51b9536e12e
branches:  trunk
changeset: 521873:e51b9536e12e
user:      augustss <augustss%NetBSD.org@localhost>
date:      Thu Feb 07 13:52:54 2002 +0000

description:
Add quirk for devices without Get Max Lun.

diffstat:

 sys/dev/usb/umass.c    |  7 ++++---
 sys/dev/usb/umassvar.h |  3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 580eac4b03d0 -r e51b9536e12e sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c       Thu Feb 07 13:52:27 2002 +0000
+++ b/sys/dev/usb/umass.c       Thu Feb 07 13:52:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umass.c,v 1.85 2001/12/31 15:54:27 augustss Exp $      */
+/*     $NetBSD: umass.c,v 1.86 2002/02/07 13:52:54 augustss Exp $      */
 /*-
  * Copyright (c) 1999 MAEKAWA Masahide <bishop%rr.iij4u.or.jp@localhost>,
  *                   Nick Hibma <n_hibma%freebsd.org@localhost>
@@ -94,7 +94,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.85 2001/12/31 15:54:27 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.86 2002/02/07 13:52:54 augustss Exp $");
 
 #include "atapibus.h"
 #include "scsibus.h"
@@ -440,7 +440,8 @@
        /*
         * Get the maximum LUN supported by the device.
         */
-       if (sc->sc_wire == UMASS_WPROTO_BBB) {
+       if (sc->sc_wire == UMASS_WPROTO_BBB && 
+           !(sc->sc_quirks & UMASS_QUIRK_NO_MAX_LUN)) {
                err = umass_bbb_get_max_lun(sc, &sc->maxlun);
                if (err) {
                        printf("%s: unable to get Max Lun: %s\n",
diff -r 580eac4b03d0 -r e51b9536e12e sys/dev/usb/umassvar.h
--- a/sys/dev/usb/umassvar.h    Thu Feb 07 13:52:27 2002 +0000
+++ b/sys/dev/usb/umassvar.h    Thu Feb 07 13:52:54 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umassvar.h,v 1.14 2001/12/29 13:46:23 augustss Exp $   */
+/*     $NetBSD: umassvar.h,v 1.15 2002/02/07 13:52:55 augustss Exp $   */
 /*-
  * Copyright (c) 1999 MAEKAWA Masahide <bishop%rr.iij4u.or.jp@localhost>,
  *                   Nick Hibma <n_hibma%freebsd.org@localhost>
@@ -182,6 +182,7 @@
 #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
 
        u_int32_t               sc_busquirks;
 



Home | Main Index | Thread Index | Old Index