aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-29 22:43:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-05-29 22:43:27 -0400
commitbb7e6984ecaebe6989d0e781e303469255871432 (patch)
treea3a835653645c346c0f45e312f83f8beadc512dd /drivers/usb
parent185e3dead35dacb79c8cca1073fd67a26d09a0d7 (diff)
Revert "USB: EHCI: fix performance regression"
This reverts commit fa38dfcc56b5f6cce787f9aaa5d1830509213802. It wasn't really a regression and David and Alan are still working through the issues reported. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-hcd.c3
-rw-r--r--drivers/usb/host/ehci-q.c15
2 files changed, 8 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 3e3c5d3ea0ad..369a8a5ea7bb 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -84,8 +84,7 @@ static const char hcd_name [] = "ehci_hcd";
84#define EHCI_IAA_MSECS 10 /* arbitrary */ 84#define EHCI_IAA_MSECS 10 /* arbitrary */
85#define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */ 85#define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */
86#define EHCI_ASYNC_JIFFIES (HZ/20) /* async idle timeout */ 86#define EHCI_ASYNC_JIFFIES (HZ/20) /* async idle timeout */
87#define EHCI_SHRINK_JIFFIES (HZ/100) /* async qh unlink delay */ 87#define EHCI_SHRINK_JIFFIES (HZ/200) /* async qh unlink delay */
88#define EHCI_SHRINK_UFRAMES (10*8) /* same value in uframes */
89 88
90/* Initial IRQ latency: faster than hw default */ 89/* Initial IRQ latency: faster than hw default */
91static int log2_irq_thresh = 0; // 0 to 6 90static int log2_irq_thresh = 0; // 0 to 6
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);
1121rescan: 1122rescan:
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;