aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Lord <lkml@rtr.ca>2007-05-14 19:48:02 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:29:48 -0400
commit55e5fdfa541ec7bf1b1613624ed4dd8cdacaa841 (patch)
tree236f91853b65f9edfc3014451ffd516275e8a676
parent8538f96ae5aada1c04d69a993b20ad160b191d47 (diff)
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>
-rw-r--r--drivers/usb/core/hub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index f4ef7c25096e..08f0c22fa917 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -403,9 +403,10 @@ static void hub_tt_kevent (struct work_struct *work)
403 struct usb_hub *hub = 403 struct usb_hub *hub =
404 container_of(work, struct usb_hub, tt.kevent); 404 container_of(work, struct usb_hub, tt.kevent);
405 unsigned long flags; 405 unsigned long flags;
406 int limit = 100;
406 407
407 spin_lock_irqsave (&hub->tt.lock, flags); 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 struct list_head *temp; 410 struct list_head *temp;
410 struct usb_tt_clear *clear; 411 struct usb_tt_clear *clear;
411 struct usb_device *hdev = hub->hdev; 412 struct usb_device *hdev = hub->hdev;