Commit 676cad77 authored by Matthew Dharm's avatar Matthew Dharm Committed by Greg Kroah-Hartman

[PATCH] USB: usb-storage driver changes for 2.6.x [2/4]

This is patch as248b from Alan Stern, modified by myself:  This adds a flag
which allows us to supress the "unneeded unusual_devs.h entry" message.
This is useful for times when idiotic device manufacturers break the rules
and release two different devices with the same VID, PID, and revision
number.
parent 5cced933
......@@ -613,7 +613,7 @@ UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9009,
"Casio",
"QV DigitalCamera",
US_SC_DEVICE, US_PR_CB, NULL,
US_FL_FIX_INQUIRY ),
US_FL_NEED_OVERRIDE | US_FL_FIX_INQUIRY ),
/* Later Casio cameras apparently tell the truth */
UNUSUAL_DEV( 0x07cf, 0x1001, 0x9010, 0x9999,
......
......@@ -490,7 +490,7 @@ static void get_device_info(struct us_data *us, int id_index)
if (unusual_dev->useTransport != US_PR_DEVICE &&
us->protocol == idesc->bInterfaceProtocol)
msg += 2;
if (msg >= 0)
if (msg >= 0 && !(unusual_dev->flags & US_FL_NEED_OVERRIDE))
printk(KERN_NOTICE USB_STORAGE "This device "
"(%04x,%04x,%04x S %02x P %02x)"
" has %s in unusual_devs.h\n"
......
......@@ -69,6 +69,7 @@ struct us_unusual_dev {
/* Flag definitions: these entries are static */
#define US_FL_SINGLE_LUN 0x00000001 /* allow access to only LUN 0 */
#define US_FL_MODE_XLATE 0 /* [no longer used] */
#define US_FL_NEED_OVERRIDE 0x00000004 /* unusual_devs entry is necessary */
#define US_FL_IGNORE_SER 0 /* [no longer used] */
#define US_FL_SCM_MULT_TARG 0x00000020 /* supports multiple targets */
#define US_FL_FIX_INQUIRY 0x00000040 /* INQUIRY response needs faking */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment