diff options
author | David Brownell <david-b@pacbell.net> | 2005-08-04 21:06:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-05 00:32:46 -0400 |
commit | 7dedacf4270a810fadcca887ac85d267b5f1882d (patch) | |
tree | 4e76d5bf3d96d142c018bc8dbba2e68ccccd0eed /drivers/usb/host/ehci-q.c | |
parent | 003ba5153582427b1df2347553529299872961e5 (diff) |
[PATCH] USB: ehci: microframe handling fix
This patch has a one line oops fix, plus related cleanups.
- The bugfix uses microframe scheduling data given to the hardware to
test "is this a periodic QH", rather than testing for nonzero period.
(Prevents an oops by providing the correct answer.)
- The cleanup going along with the patch should make it clearer what's
going on whenever those bitfields are accessed.
The bug came about when, around January, two new kinds of EHCI interrupt
scheduling operation were added, involving both the high speed (24 KBytes
per millisec) and low/full speed (1-64 bytes per millisec) microframe
scheduling. A driver for the Edirol UA-1000 Audio Capture Unit ran into
the oops; it used one of the newly supported high speed modes.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r-- | drivers/usb/host/ehci-q.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 4f97a4ad1ed3..20df01a79b2e 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c | |||
@@ -222,7 +222,7 @@ __acquires(ehci->lock) | |||
222 | struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv; | 222 | struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv; |
223 | 223 | ||
224 | /* S-mask in a QH means it's an interrupt urb */ | 224 | /* S-mask in a QH means it's an interrupt urb */ |
225 | if ((qh->hw_info2 & __constant_cpu_to_le32 (0x00ff)) != 0) { | 225 | if ((qh->hw_info2 & __constant_cpu_to_le32 (QH_SMASK)) != 0) { |
226 | 226 | ||
227 | /* ... update hc-wide periodic stats (for usbfs) */ | 227 | /* ... update hc-wide periodic stats (for usbfs) */ |
228 | ehci_to_hcd(ehci)->self.bandwidth_int_reqs--; | 228 | ehci_to_hcd(ehci)->self.bandwidth_int_reqs--; |
@@ -428,7 +428,8 @@ halt: | |||
428 | /* should be rare for periodic transfers, | 428 | /* should be rare for periodic transfers, |
429 | * except maybe high bandwidth ... | 429 | * except maybe high bandwidth ... |
430 | */ | 430 | */ |
431 | if (qh->period) { | 431 | if ((__constant_cpu_to_le32 (QH_SMASK) |
432 | & qh->hw_info2) != 0) { | ||
432 | intr_deschedule (ehci, qh); | 433 | intr_deschedule (ehci, qh); |
433 | (void) qh_schedule (ehci, qh); | 434 | (void) qh_schedule (ehci, qh); |
434 | } else | 435 | } else |