Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185255
b: refs/heads/master
c: 5d39877
h: refs/heads/master
i:
  185253: e6da348
  185251: d8abda0
  185247: 04dee41
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 646e782 commit b3f689d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1b5b5c0a8a8204f0c51d5eb99736ecfb2fd5b4e
refs/heads/master: 5d3987796c7a747e5ed3ded1eb64a9632d52a1a4
3 changes: 2 additions & 1 deletion trunk/drivers/usb/core/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ void usb_detect_quirks(struct usb_device *udev)
* for all devices. It will affect things like hub resets
* and EMF-related port disables.
*/
udev->persist_enabled = 1;
if (!(udev->quirks & USB_QUIRK_RESET_MORPHS))
udev->persist_enabled = 1;
#endif /* CONFIG_PM */
}
6 changes: 6 additions & 0 deletions trunk/drivers/usb/storage/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/usb/quirks.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
/* device can't handle its Configuration or Interface strings */
#define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008

/*device will morph if reset, don't use reset for handling errors */
#define USB_QUIRK_RESET_MORPHS 0x00000010

#endif /* __LINUX_USB_QUIRKS_H */

0 comments on commit b3f689d

Please sign in to comment.