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>

+8 -10
+1 -2
drivers/usb/host/ehci-hcd.c
··· 84 #define EHCI_IAA_MSECS 10 /* arbitrary */ 85 #define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */ 86 #define EHCI_ASYNC_JIFFIES (HZ/20) /* async idle timeout */ 87 - #define EHCI_SHRINK_JIFFIES (HZ/100) /* async qh unlink delay */ 88 - #define EHCI_SHRINK_UFRAMES (10*8) /* same value in uframes */ 89 90 /* Initial IRQ latency: faster than hw default */ 91 static int log2_irq_thresh = 0; // 0 to 6
··· 84 #define EHCI_IAA_MSECS 10 /* arbitrary */ 85 #define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */ 86 #define EHCI_ASYNC_JIFFIES (HZ/20) /* async idle timeout */ 87 + #define EHCI_SHRINK_JIFFIES (HZ/200) /* async qh unlink delay */ 88 89 /* Initial IRQ latency: faster than hw default */ 90 static int log2_irq_thresh = 0; // 0 to 6
+7 -8
drivers/usb/host/ehci-q.c
··· 1116 struct ehci_qh *qh; 1117 enum ehci_timer_action action = TIMER_IO_WATCHDOG; 1118 1119 - ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index); 1120 timer_action_done (ehci, TIMER_ASYNC_SHRINK); 1121 rescan: 1122 qh = ehci->async->qh_next.qh; ··· 1148 * doesn't stay idle for long. 1149 * (plus, avoids some kind of re-activation race.) 1150 */ 1151 - if (list_empty(&qh->qtd_list) && 1152 - qh->qh_state == QH_STATE_LINKED) { 1153 - if (!ehci->reclaim && 1154 - ((ehci->stamp - qh->stamp) & 8191) >= 1155 - EHCI_SHRINK_UFRAMES) 1156 - start_unlink_async(ehci, qh); 1157 - else 1158 action = TIMER_ASYNC_SHRINK; 1159 } 1160 1161 qh = qh->qh_next.qh;
··· 1116 struct ehci_qh *qh; 1117 enum ehci_timer_action action = TIMER_IO_WATCHDOG; 1118 1119 + if (!++(ehci->stamp)) 1120 + ehci->stamp++; 1121 timer_action_done (ehci, TIMER_ASYNC_SHRINK); 1122 rescan: 1123 qh = ehci->async->qh_next.qh; ··· 1147 * doesn't stay idle for long. 1148 * (plus, avoids some kind of re-activation race.) 1149 */ 1150 + if (list_empty (&qh->qtd_list)) { 1151 + if (qh->stamp == ehci->stamp) 1152 action = TIMER_ASYNC_SHRINK; 1153 + else if (!ehci->reclaim 1154 + && qh->qh_state == QH_STATE_LINKED) 1155 + start_unlink_async (ehci, qh); 1156 } 1157 1158 qh = qh->qh_next.qh;