diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2014-09-17 11:23:54 -0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-10-13 15:41:03 +0200 |
commit | 84694ab9297ba8c77c91caf705dde7860dc5f3f2 (patch) | |
tree | 024b8399765b8ea0100f21f0d501bf505b2cf129 /drivers/usb/host/ehci-hcd.c | |
parent | 0cded8f59fb11f836abd919c3e9ff089c51845ed (diff) | |
download | lwn-84694ab9297ba8c77c91caf705dde7860dc5f3f2.tar.gz lwn-84694ab9297ba8c77c91caf705dde7860dc5f3f2.zip |
USB: EHCI: unlink QHs even after the controller has stopped
commit 7312b5ddd47fee2356baa78c5516ef8e04eed452 upstream.
Old code in ehci-hcd tries to expedite disabling endpoints after the
controller has stopped, by destroying the endpoint's associated QH
without first unlinking the QH. This was necessary back when the
driver wasn't so careful about keeping track of the controller's
state.
But now we are careful about it, and the driver knows that when the
controller isn't running, no unlinking delay is needed. Furthermore,
skipping the unlink step will trigger a BUG() in qh_destroy() when the
preceding QH is released, because the link pointer will be non-NULL.
Removing the lines that skip the unlinking step and go directly to
QH_STATE_IDLE fixes the problem.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Joe Lawrence <joe.lawrence@stratus.com>
Tested-by: Joe Lawrence <joe.lawrence@stratus.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 784f6242b70e..51b1f4e18c0d 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -968,8 +968,6 @@ rescan: } qh->exception = 1; - if (ehci->rh_state < EHCI_RH_RUNNING) - qh->qh_state = QH_STATE_IDLE; switch (qh->qh_state) { case QH_STATE_LINKED: WARN_ON(!list_empty(&qh->qtd_list)); |