diff options
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r-- | drivers/usb/host/ehci-q.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 5200481deb27..b85b54160cda 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
@@ -1116,7 +1116,8 @@ static void scan_async (struct ehci_hcd *ehci) | |||
1116 | struct ehci_qh *qh; | 1116 | struct ehci_qh *qh; |
1117 | enum ehci_timer_action action = TIMER_IO_WATCHDOG; | 1117 | enum ehci_timer_action action = TIMER_IO_WATCHDOG; |
1118 | 1118 | ||
1119 | ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index); | 1119 | if (!++(ehci->stamp)) |
1120 | ehci->stamp++; | ||
1120 | timer_action_done (ehci, TIMER_ASYNC_SHRINK); | 1121 | timer_action_done (ehci, TIMER_ASYNC_SHRINK); |
1121 | rescan: | 1122 | rescan: |
1122 | qh = ehci->async->qh_next.qh; | 1123 | qh = ehci->async->qh_next.qh; |
@@ -1147,14 +1148,12 @@ rescan: | |||
1147 | * doesn't stay idle for long. | 1148 | * doesn't stay idle for long. |
1148 | * (plus, avoids some kind of re-activation race.) | 1149 | * (plus, avoids some kind of re-activation race.) |
1149 | */ | 1150 | */ |
1150 | if (list_empty(&qh->qtd_list) && | 1151 | if (list_empty (&qh->qtd_list)) { |
1151 | qh->qh_state == QH_STATE_LINKED) { | 1152 | if (qh->stamp == ehci->stamp) |
1152 | if (!ehci->reclaim && | ||
1153 | ((ehci->stamp - qh->stamp) & 8191) >= | ||
1154 | EHCI_SHRINK_UFRAMES) | ||
1155 | start_unlink_async(ehci, qh); | ||
1156 | else | ||
1157 | action = TIMER_ASYNC_SHRINK; | 1153 | action = TIMER_ASYNC_SHRINK; |
1154 | else if (!ehci->reclaim | ||
1155 | && qh->qh_state == QH_STATE_LINKED) | ||
1156 | start_unlink_async (ehci, qh); | ||
1158 | } | 1157 | } |
1159 | 1158 | ||
1160 | qh = qh->qh_next.qh; | 1159 | qh = qh->qh_next.qh; |