From: Alan Stern Date: Mon, 20 Aug 2007 14:48:05 +0000 (-0400) Subject: USB: disable autosuspend by default for non-hubs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7d2c592609a7da950b458403f1936d382f38ff9c;p=linux-beck.git 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 Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 7f17d0fd76c0..ebf3dc20110a 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 }