]> git.baikalelectronics.ru Git - kernel.git/commit
USB: EHCI: fix regression during bus resume
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 15 Mar 2013 18:40:26 +0000 (14:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 19:07:53 +0000 (12:07 -0700)
commit07702d5370b02e8630beb7f5d5beb014cc72be5c
treee1040e2c207c32561a9596ef40f51bf0ad328ed7
parentfe1294eb26cdac659f51afa8ff36f619618dc958
USB: EHCI: fix regression during bus resume

This patch (as1663) fixes a regression caused by commit
1bc08ce326af8d574d0390f28c2dc02d24f2f0c7 (USB: EHCI: unlink one async
QH at a time).  In order to avoid keeping multiple QHs in an unusable
intermediate state, that commit changed unlink_empty_async() so that
it unlinks only one empty QH at a time.

However, when the EHCI root hub is suspended, _all_ async QHs need to
be unlinked.  ehci_bus_suspend() used to do this by calling
unlink_empty_async(), but now this only unlinks one of the QHs, not
all of them.

The symptom is that when the root hub is resumed, USB communications
don't work for some period of time.  This is because ehci-hcd doesn't
realize it needs to restart the async schedule; it assumes that
because some QHs are already on the schedule, the schedule must be
running.

The easiest way to fix the problem is add a new function that unlinks
all the async QHs when the root hub is suspended.

This patch should be applied to all kernels that have the 1bc08ce326af
commit.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Adrian Bassett <adrian.bassett@hotmail.co.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-q.c