]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: EHCI: unlink unused QHs when the controller is stopped
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 5 Apr 2011 17:36:15 +0000 (13:36 -0400)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Apr 2011 14:53:39 +0000 (16:53 +0200)
commit573cb09867ea2b1ce7008f5b091a8138ebc9efb1
tree4b60d7c8bf0fad21b719dc9eb4ea5e4d2e9a605c
parent2a0c421ba95bb341035cd41a4ded4f75376d3763
USB: EHCI: unlink unused QHs when the controller is stopped

commit 94ae4976e253757e9b03a44d27d41b20f1829d80 upstream.

This patch (as1458) fixes a problem affecting ultra-reliable systems:
When hardware failover of an EHCI controller occurs, the data
structures do not get released correctly.  This is because the routine
responsible for removing unused QHs from the async schedule assumes
the controller is running properly (the frame counter is used in
determining how long the QH has been idle) -- but when a failover
causes the controller to be electronically disconnected from the PCI
bus, obviously it stops running.

The solution is simple: Allow scan_async() to remove a QH from the
async schedule if it has been idle for long enough _or_ if the
controller is stopped.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-Tested-by: Dan Duval <dan.duval@stratus.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-q.c