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.

diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h        Sun Apr 25 02:25:41 2004
+++ b/drivers/usb/storage/unusual_devs.h        Sun Apr 25 02:25:41 2004
@@ -613,7 +613,7 @@
                "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,
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c Sun Apr 25 02:25:41 2004
+++ b/drivers/usb/storage/usb.c Sun Apr 25 02:25:41 2004
@@ -490,7 +490,7 @@
                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"
diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
--- a/drivers/usb/storage/usb.h Sun Apr 25 02:25:41 2004
+++ b/drivers/usb/storage/usb.h Sun Apr 25 02:25:41 2004
@@ -69,6 +69,7 @@
 /* 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   */



-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg297
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to