diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 8 | ||||
-rw-r--r-- | drivers/usb/host/ehci.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 556d0ec0c1f8..9d1babc7ff65 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -760,8 +760,10 @@ static int qh_schedule(struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
760 | if (status) { | 760 | if (status) { |
761 | /* "normal" case, uframing flexible except with splits */ | 761 | /* "normal" case, uframing flexible except with splits */ |
762 | if (qh->period) { | 762 | if (qh->period) { |
763 | frame = qh->period - 1; | 763 | int i; |
764 | do { | 764 | |
765 | for (i = qh->period; status && i > 0; --i) { | ||
766 | frame = ++ehci->random_frame % qh->period; | ||
765 | for (uframe = 0; uframe < 8; uframe++) { | 767 | for (uframe = 0; uframe < 8; uframe++) { |
766 | status = check_intr_schedule (ehci, | 768 | status = check_intr_schedule (ehci, |
767 | frame, uframe, qh, | 769 | frame, uframe, qh, |
@@ -769,7 +771,7 @@ static int qh_schedule(struct ehci_hcd *ehci, struct ehci_qh *qh) | |||
769 | if (status == 0) | 771 | if (status == 0) |
770 | break; | 772 | break; |
771 | } | 773 | } |
772 | } while (status && frame--); | 774 | } |
773 | 775 | ||
774 | /* qh->period == 0 means every uframe */ | 776 | /* qh->period == 0 means every uframe */ |
775 | } else { | 777 | } else { |
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 6cff195e1a36..90ad3395bb21 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -116,6 +116,7 @@ struct ehci_hcd { /* one per controller */ | |||
116 | struct timer_list watchdog; | 116 | struct timer_list watchdog; |
117 | unsigned long actions; | 117 | unsigned long actions; |
118 | unsigned stamp; | 118 | unsigned stamp; |
119 | unsigned random_frame; | ||
119 | unsigned long next_statechange; | 120 | unsigned long next_statechange; |
120 | u32 command; | 121 | u32 command; |
121 | 122 | ||