]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:17:44 +0000 (11:17 -0800)
commitc422144aa916831a66cb3825dbb6edb567a810c1
tree0a5ecee94850117964aedccc62cc7a522a004165
parenta11c275744613ba9fedcacd2c38cccf45b7892ca
EHCI: workaround for MosChip controller bug

commit 68aa95d5d4de31c9348c1628ffa85c805305ebc5 upstream.

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>
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