aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index cdb15769468a..efee426a2465 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -403,7 +403,7 @@ static void ehci_iaa_watchdog(unsigned long param)
403 * (a) SMP races against real IAA firing and retriggering, and 403 * (a) SMP races against real IAA firing and retriggering, and
404 * (b) clean HC shutdown, when IAA watchdog was pending. 404 * (b) clean HC shutdown, when IAA watchdog was pending.
405 */ 405 */
406 if (ehci->reclaim 406 if (ehci->async_unlink
407 && !timer_pending(&ehci->iaa_watchdog) 407 && !timer_pending(&ehci->iaa_watchdog)
408 && ehci->rh_state == EHCI_RH_RUNNING) { 408 && ehci->rh_state == EHCI_RH_RUNNING) {
409 u32 cmd, status; 409 u32 cmd, status;
@@ -583,8 +583,8 @@ static void ehci_stop (struct usb_hcd *hcd)
583 usb_amd_dev_put(); 583 usb_amd_dev_put();
584 584
585#ifdef EHCI_STATS 585#ifdef EHCI_STATS
586 ehci_dbg (ehci, "irq normal %ld err %ld reclaim %ld (lost %ld)\n", 586 ehci_dbg(ehci, "irq normal %ld err %ld iaa %ld (lost %ld)\n",
587 ehci->stats.normal, ehci->stats.error, ehci->stats.reclaim, 587 ehci->stats.normal, ehci->stats.error, ehci->stats.iaa,
588 ehci->stats.lost_iaa); 588 ehci->stats.lost_iaa);
589 ehci_dbg (ehci, "complete %ld unlink %ld\n", 589 ehci_dbg (ehci, "complete %ld unlink %ld\n",
590 ehci->stats.complete, ehci->stats.unlink); 590 ehci->stats.complete, ehci->stats.unlink);
@@ -651,7 +651,6 @@ static int ehci_init(struct usb_hcd *hcd)
651 else // N microframes cached 651 else // N microframes cached
652 ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params); 652 ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params);
653 653
654 ehci->reclaim = NULL;
655 ehci->next_uframe = -1; 654 ehci->next_uframe = -1;
656 ehci->clock_frame = -1; 655 ehci->clock_frame = -1;
657 656
@@ -896,11 +895,11 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
896 /* guard against (alleged) silicon errata */ 895 /* guard against (alleged) silicon errata */
897 if (cmd & CMD_IAAD) 896 if (cmd & CMD_IAAD)
898 ehci_dbg(ehci, "IAA with IAAD still set?\n"); 897 ehci_dbg(ehci, "IAA with IAAD still set?\n");
899 if (ehci->reclaim) { 898 if (ehci->async_unlink) {
900 COUNT(ehci->stats.reclaim); 899 COUNT(ehci->stats.iaa);
901 end_unlink_async(ehci); 900 end_unlink_async(ehci);
902 } else 901 } else
903 ehci_dbg(ehci, "IAA with nothing to reclaim?\n"); 902 ehci_dbg(ehci, "IAA with nothing unlinked?\n");
904 } 903 }
905 904
906 /* remote wakeup [4.3.1] */ 905 /* remote wakeup [4.3.1] */
@@ -1027,7 +1026,7 @@ static int ehci_urb_enqueue (
1027static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) 1026static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
1028{ 1027{
1029 /* failfast */ 1028 /* failfast */
1030 if (ehci->rh_state != EHCI_RH_RUNNING && ehci->reclaim) 1029 if (ehci->rh_state != EHCI_RH_RUNNING && ehci->async_unlink)
1031 end_unlink_async(ehci); 1030 end_unlink_async(ehci);
1032 1031
1033 /* If the QH isn't linked then there's nothing we can do 1032 /* If the QH isn't linked then there's nothing we can do
@@ -1041,15 +1040,15 @@ static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
1041 } 1040 }
1042 1041
1043 /* defer till later if busy */ 1042 /* defer till later if busy */
1044 if (ehci->reclaim) { 1043 if (ehci->async_unlink) {
1045 struct ehci_qh *last; 1044 struct ehci_qh *last;
1046 1045
1047 for (last = ehci->reclaim; 1046 for (last = ehci->async_unlink;
1048 last->reclaim; 1047 last->unlink_next;
1049 last = last->reclaim) 1048 last = last->unlink_next)
1050 continue; 1049 continue;
1051 qh->qh_state = QH_STATE_UNLINK_WAIT; 1050 qh->qh_state = QH_STATE_UNLINK_WAIT;
1052 last->reclaim = qh; 1051 last->unlink_next = qh;
1053 1052
1054 /* start IAA cycle */ 1053 /* start IAA cycle */
1055 } else 1054 } else