Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97452
b: refs/heads/master
c: bb7e698
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed May 30, 2008
1 parent 316b78f commit 2f7574f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 185e3dead35dacb79c8cca1073fd67a26d09a0d7
refs/heads/master: bb7e6984ecaebe6989d0e781e303469255871432
3 changes: 1 addition & 2 deletions trunk/drivers/usb/host/ehci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ static const char hcd_name [] = "ehci_hcd";
#define EHCI_IAA_MSECS 10 /* arbitrary */
#define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */
#define EHCI_ASYNC_JIFFIES (HZ/20) /* async idle timeout */
#define EHCI_SHRINK_JIFFIES (HZ/100) /* async qh unlink delay */
#define EHCI_SHRINK_UFRAMES (10*8) /* same value in uframes */
#define EHCI_SHRINK_JIFFIES (HZ/200) /* async qh unlink delay */

/* Initial IRQ latency: faster than hw default */
static int log2_irq_thresh = 0; // 0 to 6
Expand Down
15 changes: 7 additions & 8 deletions trunk/drivers/usb/host/ehci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,8 @@ static void scan_async (struct ehci_hcd *ehci)
struct ehci_qh *qh;
enum ehci_timer_action action = TIMER_IO_WATCHDOG;

ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index);
if (!++(ehci->stamp))
ehci->stamp++;
timer_action_done (ehci, TIMER_ASYNC_SHRINK);
rescan:
qh = ehci->async->qh_next.qh;
Expand Down Expand Up @@ -1147,14 +1148,12 @@ static void scan_async (struct ehci_hcd *ehci)
* doesn't stay idle for long.
* (plus, avoids some kind of re-activation race.)
*/
if (list_empty(&qh->qtd_list) &&
qh->qh_state == QH_STATE_LINKED) {
if (!ehci->reclaim &&
((ehci->stamp - qh->stamp) & 8191) >=
EHCI_SHRINK_UFRAMES)
start_unlink_async(ehci, qh);
else
if (list_empty (&qh->qtd_list)) {
if (qh->stamp == ehci->stamp)
action = TIMER_ASYNC_SHRINK;
else if (!ehci->reclaim
&& qh->qh_state == QH_STATE_LINKED)
start_unlink_async (ehci, qh);
}

qh = qh->qh_next.qh;
Expand Down

0 comments on commit 2f7574f

Please sign in to comment.