diff options
-rw-r--r-- | drivers/usb/core/quirks.c | 3 | ||||
-rw-r--r-- | drivers/usb/storage/transport.c | 6 | ||||
-rw-r--r-- | include/linux/usb/quirks.h | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index ab93918d9207..0b689224394b 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c | |||
@@ -120,6 +120,7 @@ void usb_detect_quirks(struct usb_device *udev) | |||
120 | * for all devices. It will affect things like hub resets | 120 | * for all devices. It will affect things like hub resets |
121 | * and EMF-related port disables. | 121 | * and EMF-related port disables. |
122 | */ | 122 | */ |
123 | udev->persist_enabled = 1; | 123 | if (!(udev->quirks & USB_QUIRK_RESET_MORPHS)) |
124 | udev->persist_enabled = 1; | ||
124 | #endif /* CONFIG_PM */ | 125 | #endif /* CONFIG_PM */ |
125 | } | 126 | } |
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index cc313d16d727..468038126e5e 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
@@ -47,6 +47,8 @@ | |||
47 | #include <linux/errno.h> | 47 | #include <linux/errno.h> |
48 | #include <linux/slab.h> | 48 | #include <linux/slab.h> |
49 | 49 | ||
50 | #include <linux/usb/quirks.h> | ||
51 | |||
50 | #include <scsi/scsi.h> | 52 | #include <scsi/scsi.h> |
51 | #include <scsi/scsi_eh.h> | 53 | #include <scsi/scsi_eh.h> |
52 | #include <scsi/scsi_device.h> | 54 | #include <scsi/scsi_device.h> |
@@ -1297,6 +1299,10 @@ int usb_stor_port_reset(struct us_data *us) | |||
1297 | { | 1299 | { |
1298 | int result; | 1300 | int result; |
1299 | 1301 | ||
1302 | /*for these devices we must use the class specific method */ | ||
1303 | if (us->pusb_dev->quirks & USB_QUIRK_RESET_MORPHS) | ||
1304 | return -EPERM; | ||
1305 | |||
1300 | result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf); | 1306 | result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf); |
1301 | if (result < 0) | 1307 | if (result < 0) |
1302 | US_DEBUGP("unable to lock device for reset: %d\n", result); | 1308 | US_DEBUGP("unable to lock device for reset: %d\n", result); |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 2526f3bbd273..0a555dd131fc 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -19,4 +19,7 @@ | |||
19 | /* device can't handle its Configuration or Interface strings */ | 19 | /* device can't handle its Configuration or Interface strings */ |
20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 | 20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 |
21 | 21 | ||
22 | /*device will morph if reset, don't use reset for handling errors */ | ||
23 | #define USB_QUIRK_RESET_MORPHS 0x00000010 | ||
24 | |||
22 | #endif /* __LINUX_USB_QUIRKS_H */ | 25 | #endif /* __LINUX_USB_QUIRKS_H */ |