Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
[pandora-kernel.git] / drivers / usb / host / ehci-q.c
index 5200481..2622b65 100644 (file)
@@ -1141,17 +1141,17 @@ rescan:
                                }
                        }
 
-                       /* unlink idle entries, reducing HC PCI usage as well
+                       /* unlink idle entries, reducing DMA usage as well
                         * as HCD schedule-scanning costs.  delay for any qh
                         * we just scanned, there's a not-unusual case that it
                         * 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)
+                       if (list_empty(&qh->qtd_list)
+                                       && qh->qh_state == QH_STATE_LINKED) {
+                               if (!ehci->reclaim
+                                       && ((ehci->stamp - qh->stamp) & 0x1fff)
+                                               >= (EHCI_SHRINK_FRAMES * 8))
                                        start_unlink_async(ehci, qh);
                                else
                                        action = TIMER_ASYNC_SHRINK;