]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/usb/storage/transport.c
USB: storage: Never reset devices that will morph to an old mode
[net-next-2.6.git] / drivers / usb / storage / transport.c
index cc313d16d727d0dc827627835d380249f638ab9c..468038126e5eb00ba5180585a8923575103be9d0 100644 (file)
@@ -47,6 +47,8 @@
 #include <linux/errno.h>
 #include <linux/slab.h>
 
+#include <linux/usb/quirks.h>
+
 #include <scsi/scsi.h>
 #include <scsi/scsi_eh.h>
 #include <scsi/scsi_device.h>
@@ -1297,6 +1299,10 @@ int usb_stor_port_reset(struct us_data *us)
 {
        int result;
 
+       /*for these devices we must use the class specific method */
+       if (us->pusb_dev->quirks & USB_QUIRK_RESET_MORPHS)
+               return -EPERM;
+
        result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf);
        if (result < 0)
                US_DEBUGP("unable to lock device for reset: %d\n", result);