]> git.baikalelectronics.ru Git - kernel.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)
commit74ff1e627e2150e7e92439552c8544600247051d
tree40e95d7bf00bf2ca4ed8f25ae9503f780fb6d25a
parent40597d5e73529278350d36249f33bf968b98383d
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