diff options
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 66259dc7822e..5c82bbab9a48 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -649,7 +649,8 @@ static void end_unlink_intr(struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
649 | qh->qh_state = QH_STATE_IDLE; | 649 | qh->qh_state = QH_STATE_IDLE; |
650 | hw->hw_next = EHCI_LIST_END(ehci); | 650 | hw->hw_next = EHCI_LIST_END(ehci); |
651 | 651 | ||
652 | qh_completions(ehci, qh); | 652 | if (!list_empty(&qh->qtd_list)) |
653 | qh_completions(ehci, qh); | ||
653 | 654 | ||
654 | /* reschedule QH iff another request is queued */ | 655 | /* reschedule QH iff another request is queued */ |
655 | if (!list_empty(&qh->qtd_list) && ehci->rh_state == EHCI_RH_RUNNING) { | 656 | if (!list_empty(&qh->qtd_list) && ehci->rh_state == EHCI_RH_RUNNING) { |
@@ -914,7 +915,7 @@ static void scan_intr(struct ehci_hcd *ehci) | |||
914 | 915 | ||
915 | list_for_each_entry_safe(qh, ehci->qh_scan_next, &ehci->intr_qh_list, | 916 | list_for_each_entry_safe(qh, ehci->qh_scan_next, &ehci->intr_qh_list, |
916 | intr_node) { | 917 | intr_node) { |
917 | rescan: | 918 | |
918 | /* clean any finished work for this qh */ | 919 | /* clean any finished work for this qh */ |
919 | if (!list_empty(&qh->qtd_list)) { | 920 | if (!list_empty(&qh->qtd_list)) { |
920 | int temp; | 921 | int temp; |
@@ -927,12 +928,9 @@ static void scan_intr(struct ehci_hcd *ehci) | |||
927 | * in qh_unlink_periodic(). | 928 | * in qh_unlink_periodic(). |
928 | */ | 929 | */ |
929 | temp = qh_completions(ehci, qh); | 930 | temp = qh_completions(ehci, qh); |
930 | if (unlikely(qh->needs_rescan || | 931 | if (unlikely(temp || (list_empty(&qh->qtd_list) && |
931 | (list_empty(&qh->qtd_list) && | 932 | qh->qh_state == QH_STATE_LINKED))) |
932 | qh->qh_state == QH_STATE_LINKED))) | ||
933 | start_unlink_intr(ehci, qh); | 933 | start_unlink_intr(ehci, qh); |
934 | else if (temp != 0) | ||
935 | goto rescan; | ||
936 | } | 934 | } |
937 | } | 935 | } |
938 | } | 936 | } |