Commit 571e4121 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

USB: remove iteration limit in hub_tt_work()

This patch (as1621) removes the limit on the number of loops allowed
in hub_tt_work().  The value is arbitrary, and it's silly to have a
limit in the first place -- anything beyond the limit would not get
handled.

Besides, it's most unlikely that we'll ever need to clear more than a
couple of TT buffers at any time.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bcbec053
...@@ -741,7 +741,6 @@ static void hub_tt_work(struct work_struct *work) ...@@ -741,7 +741,6 @@ static void hub_tt_work(struct work_struct *work)
struct usb_hub *hub = struct usb_hub *hub =
container_of(work, struct usb_hub, tt.clear_work); container_of(work, struct usb_hub, tt.clear_work);
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 (!list_empty(&hub->tt.clear_list)) {
...@@ -751,9 +750,6 @@ static void hub_tt_work(struct work_struct *work) ...@@ -751,9 +750,6 @@ static void hub_tt_work(struct work_struct *work)
const struct hc_driver *drv; const struct hc_driver *drv;
int status; int status;
if (!hub->quiescing && --limit < 0)
break;
next = hub->tt.clear_list.next; next = hub->tt.clear_list.next;
clear = list_entry (next, struct usb_tt_clear, clear_list); clear = list_entry (next, struct usb_tt_clear, clear_list);
list_del (&clear->clear_list); list_del (&clear->clear_list);
......
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