Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: hub.c loops forever on resume from ram due to bluetooth

Okay, found it. The root cause here was a missing CONFIG_USB_SUSPEND=y,
which means the hci_usb device never got marked as USB_STATE_SUSPENDED,
which then caused the loop to go on forever.

The system works fine now with CONFIG_USB_SUSPEND=y in the .config.

Here's the patch to prevent future lockups for this or other causes.
I no longer need it, but it does still seem a good idea.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Mark Lord and committed by
Greg Kroah-Hartman
55e5fdfa 8538f96a

+2 -1
+2 -1
drivers/usb/core/hub.c
··· 403 403 struct usb_hub *hub = 404 404 container_of(work, struct usb_hub, tt.kevent); 405 405 unsigned long flags; 406 + int limit = 100; 406 407 407 408 spin_lock_irqsave (&hub->tt.lock, flags); 408 - while (!list_empty (&hub->tt.clear_list)) { 409 + while (--limit && !list_empty (&hub->tt.clear_list)) { 409 410 struct list_head *temp; 410 411 struct usb_tt_clear *clear; 411 412 struct usb_device *hdev = hub->hdev;