diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-12-18 11:14:21 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 22:53:23 (GMT) |
commit | 5d3987796c7a747e5ed3ded1eb64a9632d52a1a4 (patch) | |
tree | f677d4014bd5e25d1f4ccac1862fd95655baedec /drivers/usb/storage/transport.c | |
parent | d1b5b5c0a8a8204f0c51d5eb99736ecfb2fd5b4e (diff) | |
download | linux-fsl-qoriq-5d3987796c7a747e5ed3ded1eb64a9632d52a1a4.tar.xz |
USB: storage: Never reset devices that will morph to an old mode
Some devices must be switched to a new mode to fully use them.
A reset would make them revert to the old mode. Therefore a reset
must not be used for error handling with such devices.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage/transport.c')
-rw-r--r-- | drivers/usb/storage/transport.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index cc313d1..4680381 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c @@ -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); |