]> git.baikalelectronics.ru Git - kernel.git/commit
EHCI: workaround for MosChip controller bug
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 12 Oct 2011 14:39:14 +0000 (10:39 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 18 Oct 2011 20:49:33 +0000 (13:49 -0700)
commit26006f1d0e30c55398a912cc2bb6d82e3515b01a
tree7782dad26b9672be03b78a70cae1105f395dafe2
parentaa1ad09ca6d5b17f2aa419278a6c7a2050a927f5
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>
drivers/usb/host/ehci-dbg.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci-sched.c
drivers/usb/host/ehci.h