]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
USB: OHCI: workaround for hardware bug: retired TDs not added to the Done Queue
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 26 Nov 2012 17:36:21 +0000 (12:36 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Jan 2013 03:33:16 +0000 (03:33 +0000)
commit536de050a7bd82296685f02b43390c141081bb2b
treea75818da838acc5916732ec4ce3492d1d2e438bf
parente88b9090be26e674bda11fbad6dd7056065c1196
USB: OHCI: workaround for hardware bug: retired TDs not added to the Done Queue

commit 50ce5c0683aa83eb161624ea89daa5a9eee0c2ce upstream.

This patch (as1636) is a partial workaround for a hardware bug
affecting OHCI controllers by NVIDIA at least, maybe others too.  When
the controller retires a Transfer Descriptor, it is supposed to add
the TD onto the Done Queue.  But sometimes this doesn't happen, with
the result that ohci-hcd never realizes the corresponding transfer has
finished.  Symptoms can vary; a typical result is that USB audio stops
working after a while.

The patch works around the problem by recognizing that TDs are always
processed in order.  Therefore, if a later TD is found on the Done
Queue than all the earlier TDs for the same endpoint must be finished
as well.

Unfortunately this won't solve the problem in cases where the missing
TD is the last one in the endpoint's queue.  A complete fix would
require a signficant amount of change to the driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/host/ohci-q.c