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.
This commit is contained in:
rmind 2008-09-06 21:49:00 +00:00
parent 5edea45e2c
commit aa93fc3fa8
4 changed files with 22 additions and 7 deletions

View File

@ -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",

View File

@ -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>
@ -161,6 +161,18 @@ Static const struct umass_quirk umass_quirks[] = {
NULL, NULL
},
/*
* 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

View File

@ -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

View File

@ -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