Pete Zaitcev wrote:

...

This is insane, Alan. There must be a better way.


Alan is the one that always answers the mails concerning this device, so is probably fed up with this casio QV [EMAIL PROTECTED] camera :)


Anyway, if you want to go with a "new flag" approach, here is a patch. It is not tested (I don't have one of those cameras) but at least compiles :)

This is against 2.6.5 vanilla.

--
Paulo Marques- www.grupopie.com
"In a world without walls and fences who needs windows and gates?"
diff -uprN -X dontdiff linux-vanilla/drivers/usb/storage/unusual_devs.h 
linux-2.6.5/drivers/usb/storage/unusual_devs.h
--- linux-vanilla/drivers/usb/storage/unusual_devs.h    2004-04-04 04:37:40.000000000 
+0100
+++ linux-2.6.5/drivers/usb/storage/unusual_devs.h      2004-04-15 12:36:06.316369136 
+0100
@@ -636,7 +636,7 @@ UNUSUAL_DEV( 0x07cf, 0x1001, 0x1000, 0x9
                "Casio",
                "QV DigitalCamera",
                US_SC_DEVICE, US_PR_CB, NULL,
-               US_FL_FIX_INQUIRY ),
+               US_FL_FIX_INQUIRY | US_FL_NO_UNNEEDED ),
 
 /* Later Casio cameras apparently tell the truth */
 UNUSUAL_DEV( 0x07cf, 0x1001, 0x9010, 0x9999,
diff -uprN -X dontdiff linux-vanilla/drivers/usb/storage/usb.c 
linux-2.6.5/drivers/usb/storage/usb.c
--- linux-vanilla/drivers/usb/storage/usb.c     2004-04-04 04:36:52.000000000 +0100
+++ linux-2.6.5/drivers/usb/storage/usb.c       2004-04-15 12:35:48.837026400 +0100
@@ -490,7 +490,7 @@ static void get_device_info(struct us_da
                if (unusual_dev->useTransport != US_PR_DEVICE &&
                        us->protocol == idesc->bInterfaceProtocol)
                        msg += 2;
-               if (msg >= 0)
+               if (msg >= 0 && !(unusual_dev->flags & US_FL_NO_UNNEEDED))
                        printk(KERN_NOTICE USB_STORAGE "This device "
                                "(%04x,%04x,%04x S %02x P %02x)"
                                " has %s in unusual_devs.h\n"
diff -uprN -X dontdiff linux-vanilla/drivers/usb/storage/usb.h 
linux-2.6.5/drivers/usb/storage/usb.h
--- linux-vanilla/drivers/usb/storage/usb.h     2004-04-04 04:37:36.000000000 +0100
+++ linux-2.6.5/drivers/usb/storage/usb.h       2004-04-15 12:35:57.978636664 +0100
@@ -73,6 +73,7 @@ struct us_unusual_dev {
 #define US_FL_SCM_MULT_TARG   0x00000020 /* supports multiple targets      */
 #define US_FL_FIX_INQUIRY     0x00000040 /* INQUIRY response needs faking   */
 #define US_FL_FIX_CAPACITY    0x00000080 /* READ CAPACITY response too big  */
+#define US_FL_NO_UNNEEDED     0x00000100 /* show no warning about unneeded entry */
 
 /* Dynamic flag definitions: used in set_bit() etc. */
 #define US_FLIDX_URB_ACTIVE    18  /* 0x00040000  current_urb is in use  */

Reply via email to