diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2005-04-09 17:26:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-27 17:43:43 -0400 |
commit | f5946f8220a866dcdb8edc6abe23c1443e252425 (patch) | |
tree | 3984d5eb8382d3bc694168e90957206d97fd7d1c /drivers/usb/host/uhci-q.c | |
parent | 014e73c99aa408f3766afe8d11a1caa3a708b736 (diff) |
[PATCH] USB UHCI: Minor improvements
This patch makes a few small improvements in the UHCI driver. Some
code is moved between different source files and a more useful pointer
is passed to a callback routine.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-q.c')
-rw-r--r-- | drivers/usb/host/uhci-q.c | 23 |
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 | |||
1541 | static 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 | } | ||