aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-q.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/uhci-q.c')
-rw-r--r--drivers/usb/host/uhci-q.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 2a7c19501f24..f5c75885f7be 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -1537,3 +1537,26 @@ static void uhci_scan_schedule(struct uhci_hcd *uhci, struct pt_regs *regs)
1537 /* Wake up anyone waiting for an URB to complete */ 1537 /* Wake up anyone waiting for an URB to complete */
1538 wake_up_all(&uhci->waitqh); 1538 wake_up_all(&uhci->waitqh);
1539} 1539}
1540
1541static void check_fsbr(struct uhci_hcd *uhci)
1542{
1543 struct urb_priv *up;
1544
1545 list_for_each_entry(up, &uhci->urb_list, urb_list) {
1546 struct urb *u = up->urb;
1547
1548 spin_lock(&u->lock);
1549
1550 /* Check if the FSBR timed out */
1551 if (up->fsbr && !up->fsbr_timeout && time_after_eq(jiffies, up->fsbrtime + IDLE_TIMEOUT))
1552 uhci_fsbr_timeout(uhci, u);
1553
1554 spin_unlock(&u->lock);
1555 }
1556
1557 /* Really disable FSBR */
1558 if (!uhci->fsbr && uhci->fsbrtimeout && time_after_eq(jiffies, uhci->fsbrtimeout)) {
1559 uhci->fsbrtimeout = 0;
1560 uhci->skel_term_qh->link = UHCI_PTR_TERM;
1561 }
1562}