]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: Retry port status check on resume to work around RH bugs
authorJulius Werner <jwerner@chromium.org>
Tue, 27 Jan 2015 21:20:12 +0000 (13:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Feb 2015 23:28:32 +0000 (15:28 -0800)
commit7fa40910e0bf5ef32eca49595d950cb24f6402bf
tree40e95d7bf00bf2ca4ed8f25ae9503f780fb6d25a
parent7671bd1e97b9fa09aea69e76375ada9534c735a3
usb: Retry port status check on resume to work around RH bugs

The EHCI controller on the RK3288 SoC is violating basic parts of the
USB spec and thereby unable to properly resume a suspended port. It does
not start SOF generation within 3ms of finishing resume signaling, so
the attached device will drop of the bus again. This is a particular
problem with runtime PM, where accessing the device will trigger a
resume that immediately makes it unavailable (and reenumerate with a new
handle).

Thankfully, the persist feature is generally able to work around stuff
like that. Unfortunately, it doesn't quite work in this particular case
because the controller will turn off the CurrentConnectStatus bit for an
instant while the device is reconnecting, which causes the kernel to
conclude that it permanently disappeared. This patch adds a tiny retry
mechanism to the core port resume code which will catch this case and
shouldn't have any notable impact on other controllers.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c