Commit 55e5fdfa authored by Mark Lord's avatar Mark Lord Committed by Greg Kroah-Hartman

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: default avatarMark Lord <mlord@pobox.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8538f96a
...@@ -403,9 +403,10 @@ static void hub_tt_kevent (struct work_struct *work) ...@@ -403,9 +403,10 @@ static void hub_tt_kevent (struct work_struct *work)
struct usb_hub *hub = struct usb_hub *hub =
container_of(work, struct usb_hub, tt.kevent); container_of(work, struct usb_hub, tt.kevent);
unsigned long flags; unsigned long flags;
int limit = 100;
spin_lock_irqsave (&hub->tt.lock, flags); spin_lock_irqsave (&hub->tt.lock, flags);
while (!list_empty (&hub->tt.clear_list)) { while (--limit && !list_empty (&hub->tt.clear_list)) {
struct list_head *temp; struct list_head *temp;
struct usb_tt_clear *clear; struct usb_tt_clear *clear;
struct usb_device *hdev = hub->hdev; struct usb_device *hdev = hub->hdev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment