summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-08-20 10:48:05 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-09-13 05:49:04 -0700
commit7d2c592609a7da950b458403f1936d382f38ff9c (patch)
tree4bff63e224c2911c8cbe309b22c0cacdaa72addd /drivers
parentc87ce65868bbf9bbea9c3f112ff8315302daf8f2 (diff)
downloadlinux-3.10-7d2c592609a7da950b458403f1936d382f38ff9c.tar.gz
linux-3.10-7d2c592609a7da950b458403f1936d382f38ff9c.tar.bz2
linux-3.10-7d2c592609a7da950b458403f1936d382f38ff9c.zip
USB: disable autosuspend by default for non-hubs
This patch (as965) disables autosuspend by default for all USB devices other than hubs. We are seeing too many devices that can't suspend or resume properly, the blacklist is growing unreasonably quickly, and this sort of thing should be handled in userspace. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/core/quirks.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 7f17d0fd76c..ebf3dc20110 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -152,4 +152,10 @@ void usb_detect_quirks(struct usb_device *udev)
/* do any special quirk handling here if needed */
if (udev->quirks & USB_QUIRK_NO_AUTOSUSPEND)
usb_autosuspend_quirk(udev);
+
+ /* By default, disable autosuspend for all non-hubs */
+#ifdef CONFIG_USB_SUSPEND
+ if (udev->descriptor.bDeviceClass != USB_CLASS_HUB)
+ udev->autosuspend_delay = -1;
+#endif
}