aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorKalimochoAz <calimochoazucarado@gmail.com>2012-10-31 22:54:11 +0100
committerKalimochoAz <calimochoazucarado@gmail.com>2012-10-31 22:54:11 +0100
commitcb65a3eb390b7cc995c4aa6b7bff32a4696242e6 (patch)
tree9a8a12cc439b49e5fc60283c5f9008e8beb47cec /drivers/usb/core
parent2e8a7ef975522bc50b765f07ff297b09709515f0 (diff)
parent27d0858dbcf199838b8c50a3e94d397bf326d986 (diff)
downloadkernel_samsung_crespo-cb65a3eb390b7cc995c4aa6b7bff32a4696242e6.zip
kernel_samsung_crespo-cb65a3eb390b7cc995c4aa6b7bff32a4696242e6.tar.gz
kernel_samsung_crespo-cb65a3eb390b7cc995c4aa6b7bff32a4696242e6.tar.bz2
Merge kernel.org linux-3.0.y into HEAD
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/hub.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 3c0aa02..b4688fa 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -482,13 +482,16 @@ static void hub_tt_work(struct work_struct *work)
int limit = 100;
spin_lock_irqsave (&hub->tt.lock, flags);
- while (--limit && !list_empty (&hub->tt.clear_list)) {
+ while (!list_empty(&hub->tt.clear_list)) {
struct list_head *next;
struct usb_tt_clear *clear;
struct usb_device *hdev = hub->hdev;
const struct hc_driver *drv;
int status;
+ if (!hub->quiescing && --limit < 0)
+ break;
+
next = hub->tt.clear_list.next;
clear = list_entry (next, struct usb_tt_clear, clear_list);
list_del (&clear->clear_list);
@@ -952,7 +955,7 @@ static void hub_quiesce(struct usb_hub *hub, enum hub_quiescing_type type)
if (hub->has_indicators)
cancel_delayed_work_sync(&hub->leds);
if (hub->tt.hub)
- cancel_work_sync(&hub->tt.clear_work);
+ flush_work_sync(&hub->tt.clear_work);
}
/* caller has locked the hub device */