diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-03 13:24:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-03 13:24:57 -0500 |
commit | bc2e4a90d9f75f1664c1587eb09ecd10bb71b022 (patch) | |
tree | e58b88e0bd0cdb0fd2ce9f82fb5bc889fb6f38c0 | |
parent | 68b86a25225d03f134f306caffc46df80906c3f8 (diff) | |
parent | 221f8dfca89276d8aec54c6d07fbe20c281668f0 (diff) |
Merge tag 'usb-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patch revert from Greg Kroah-Hartman:
"Here is one remaining USB patch for 3.9-rc1, it reverts a 3.8 patch
that has caused a lot of regressions for some VIA EHCI controllers."
* tag 'usb-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
USB: EHCI: revert "remove ASS/PSS polling timeout"
-rw-r--r-- | drivers/usb/host/ehci-timer.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/usb/host/ehci-timer.c b/drivers/usb/host/ehci-timer.c index f904071d70df..20dbdcbe9b0f 100644 --- a/drivers/usb/host/ehci-timer.c +++ b/drivers/usb/host/ehci-timer.c | |||
@@ -113,15 +113,14 @@ static void ehci_poll_ASS(struct ehci_hcd *ehci) | |||
113 | 113 | ||
114 | if (want != actual) { | 114 | if (want != actual) { |
115 | 115 | ||
116 | /* Poll again later */ | 116 | /* Poll again later, but give up after about 20 ms */ |
117 | ehci_enable_event(ehci, EHCI_HRTIMER_POLL_ASS, true); | 117 | if (ehci->ASS_poll_count++ < 20) { |
118 | ++ehci->ASS_poll_count; | 118 | ehci_enable_event(ehci, EHCI_HRTIMER_POLL_ASS, true); |
119 | return; | 119 | return; |
120 | } | ||
121 | ehci_dbg(ehci, "Waited too long for the async schedule status (%x/%x), giving up\n", | ||
122 | want, actual); | ||
120 | } | 123 | } |
121 | |||
122 | if (ehci->ASS_poll_count > 20) | ||
123 | ehci_dbg(ehci, "ASS poll count reached %d\n", | ||
124 | ehci->ASS_poll_count); | ||
125 | ehci->ASS_poll_count = 0; | 124 | ehci->ASS_poll_count = 0; |
126 | 125 | ||
127 | /* The status is up-to-date; restart or stop the schedule as needed */ | 126 | /* The status is up-to-date; restart or stop the schedule as needed */ |
@@ -160,14 +159,14 @@ static void ehci_poll_PSS(struct ehci_hcd *ehci) | |||
160 | 159 | ||
161 | if (want != actual) { | 160 | if (want != actual) { |
162 | 161 | ||
163 | /* Poll again later */ | 162 | /* Poll again later, but give up after about 20 ms */ |
164 | ehci_enable_event(ehci, EHCI_HRTIMER_POLL_PSS, true); | 163 | if (ehci->PSS_poll_count++ < 20) { |
165 | return; | 164 | ehci_enable_event(ehci, EHCI_HRTIMER_POLL_PSS, true); |
165 | return; | ||
166 | } | ||
167 | ehci_dbg(ehci, "Waited too long for the periodic schedule status (%x/%x), giving up\n", | ||
168 | want, actual); | ||
166 | } | 169 | } |
167 | |||
168 | if (ehci->PSS_poll_count > 20) | ||
169 | ehci_dbg(ehci, "PSS poll count reached %d\n", | ||
170 | ehci->PSS_poll_count); | ||
171 | ehci->PSS_poll_count = 0; | 170 | ehci->PSS_poll_count = 0; |
172 | 171 | ||
173 | /* The status is up-to-date; restart or stop the schedule as needed */ | 172 | /* The status is up-to-date; restart or stop the schedule as needed */ |