USB: disable autosuspend by default for non-hubs
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 20 Aug 2007 14:48:05 +0000 (10:48 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 13 Sep 2007 12:49:04 +0000 (05:49 -0700)
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>
drivers/usb/core/quirks.c

index 7f17d0f..ebf3dc2 100644 (file)
@@ -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
 }