diff options
| author | rmind <rmind@NetBSD.org> | 2008-09-06 21:49:00 +0000 |
|---|---|---|
| committer | rmind <rmind@NetBSD.org> | 2008-09-06 21:49:00 +0000 |
| commit | aa93fc3fa8b12e4378d6584a8b95f063191d90af (patch) | |
| tree | c9469e6c45f2268a77a4c52ebcb80541bcfe254e /sys/dev | |
| parent | 5edea45e2c3bed201935c5d8b156e6ba9dcca660 (diff) | |
PR/37948: Yojiro UO: Support for Sony GPS GPS-CS1 devices. Check the support
of UR_BBB_GET_MAX_LUN, and disable the logic, if needed.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/umass.c | 7 | ||||
| -rw-r--r-- | sys/dev/usb/umass_quirks.c | 16 | ||||
| -rw-r--r-- | sys/dev/usb/umassvar.h | 3 | ||||
| -rw-r--r-- | sys/dev/usb/usbdevs | 3 |
4 files changed, 22 insertions, 7 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 421bd47dede..05ffc5a966a 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass.c,v 1.128 2008/05/24 16:40:58 cube Exp $ */ +/* $NetBSD: umass.c,v 1.129 2008/09/06 21:49:00 rmind Exp $ */ /* * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -124,7 +124,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.128 2008/05/24 16:40:58 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.129 2008/09/06 21:49:00 rmind Exp $"); #include "atapibus.h" #include "scsibus.h" @@ -470,7 +470,8 @@ USB_ATTACH(umass) /* * 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_NOGETMAXLUN) == 0) { err = umass_bbb_get_max_lun(sc, &sc->maxlun); if (err) { aprint_error_dev(self, "unable to get Max Lun: %s\n", diff --git a/sys/dev/usb/umass_quirks.c b/sys/dev/usb/umass_quirks.c index 06de835ef38..73e2e0e6680 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.74 2008/05/11 05:20:33 mlelstv Exp $ */ +/* $NetBSD: umass_quirks.c,v 1.75 2008/09/06 21:49:00 rmind Exp $ */ /* * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.74 2008/05/11 05:20:33 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.75 2008/09/06 21:49:00 rmind Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -162,6 +162,18 @@ Static const struct umass_quirk umass_quirks[] = { }, /* + * The SONY Portable GPS strage device almost hangs up when request + * UR_BBB_GET_MAX_LUN - disable the query logic. + */ + { { USB_VENDOR_SONY, USB_PRODUCT_SONY_GPS_CS1 }, + UMASS_WPROTO_BBB, UMASS_CPROTO_UNSPEC, + UMASS_QUIRK_NOGETMAXLUN, + 0, + UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, + NULL, NULL + }, + + /* * The DiskOnKey does not reject commands it doesn't recognize in a * sane way -- rather than STALLing the bulk pipe, it continually NAKs * until we time out. To prevent being screwed by this, for now we diff --git a/sys/dev/usb/umassvar.h b/sys/dev/usb/umassvar.h index ab09bad050c..f5aea73da8c 100644 --- a/sys/dev/usb/umassvar.h +++ b/sys/dev/usb/umassvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: umassvar.h,v 1.26 2008/01/21 12:11:21 ichiro Exp $ */ +/* $NetBSD: umassvar.h,v 1.27 2008/09/06 21:49:00 rmind Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>, * Nick Hibma <n_hibma@freebsd.org> @@ -179,6 +179,7 @@ struct umass_softc { #define UMASS_QUIRK_WRONG_CSWSIG 0x00000001 #define UMASS_QUIRK_WRONG_CSWTAG 0x00000002 #define UMASS_QUIRK_RBC_PAD_TO_12 0x00000004 +#define UMASS_QUIRK_NOGETMAXLUN 0x00000008 #define UMASS_QUIRK_USE_DEFAULTMATCH -1 diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index a767331292e..0866db4d718 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.509 2008/09/06 21:42:05 rmind Exp $ +$NetBSD: usbdevs,v 1.510 2008/09/06 21:49:00 rmind Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -2119,6 +2119,7 @@ product SONY CLIE_NX60 0x00da Sony Clie nx60 product SONY PS2EYETOY4 0x0154 PlayStation2 EyeToy v154 product SONY PS2EYETOY5 0x0155 PlayStation2 EyeToy v155 product SONY CLIE_TJ25 0x0169 Sony Clie tj25 +product SONY GPS_CS1 0x0298 Sony GPS GPS-CS1 /* SOURCENEXT products */ product SOURCENEXT KEIKAI8_CHG 0x012e KeikaiDenwa 8 with charger |
