ChangeSet 1.1371.759.30, 2004/04/26 16:10:25-07:00, [EMAIL PROTECTED]
[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.
drivers/usb/storage/unusual_devs.h | 2 +-
drivers/usb/storage/usb.c | 2 +-
drivers/usb/storage/usb.h | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h Fri May 14 15:32:27 2004
+++ b/drivers/usb/storage/unusual_devs.h Fri May 14 15:32:27 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 Fri May 14 15:32:27 2004
+++ b/drivers/usb/storage/usb.c Fri May 14 15:32:27 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 Fri May 14 15:32:27 2004
+++ b/drivers/usb/storage/usb.h Fri May 14 15:32:27 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: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel