diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2011-10-12 16:39:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-18 22:49:33 +0200 |
commit | 68aa95d5d4de31c9348c1628ffa85c805305ebc5 (patch) | |
tree | 7782dad26b9672be03b78a70cae1105f395dafe2 /drivers/usb/host/ehci-dbg.c | |
parent | usb: gadget: file_storage: fix race on unloading (diff) | |
download | linux-68aa95d5d4de31c9348c1628ffa85c805305ebc5.tar.xz linux-68aa95d5d4de31c9348c1628ffa85c805305ebc5.zip |
EHCI: workaround for MosChip controller bug
This patch (as1489) works around a hardware bug in MosChip EHCI
controllers. Evidently when one of these controllers increments the
frame-index register, it changes the three low-order bits (the
microframe counter) before changing the higher order bits (the frame
counter). If the register is read at just the wrong time, the value
obtained is too low by 8.
When the appropriate quirk flag is set, we work around this problem by
reading the frame-index register a second time if the first value's
three low-order bits are all 0. This gives the hardware a chance to
finish updating the register, yielding the correct value.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Jason N Pitt <jpitt@fhcrc.org>
CC: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-dbg.c')
-rw-r--r-- | drivers/usb/host/ehci-dbg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 9952505d2357..d6d74d2e09f4 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -821,7 +821,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) next += temp; temp = scnprintf (next, size, "uframe %04x\n", - ehci_readl(ehci, &ehci->regs->frame_index)); + ehci_read_frame_index(ehci)); size -= temp; next += temp; |