]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: finish suspend/reset work independently from musb_hub_control()
authorDaniel Mack <zonque@gmail.com>
Wed, 18 Dec 2013 19:23:46 +0000 (20:23 +0100)
committerFelipe Balbi <balbi@ti.com>
Thu, 19 Dec 2013 16:31:11 +0000 (10:31 -0600)
commitf9a8cef1598bb40c49e1c5cbd1cfc179e7f6d1ee
treeeaa291bdb62bc8773df7f62d760c8ecf6fa25a65
parent445cb6f4754e1b647c03ffd18750377fd3a04782
usb: musb: finish suspend/reset work independently from musb_hub_control()

Currently, resume and reset is completed when the USB core calls back
the root hub, asking for the port's state. This results in
unpredictable timing of state assertion, which in turn renders some
USB devices unusable after resume.

Fix this by moving the logic to end the reset and suspend state out of
musb_hub_control() into separate functions called from delayed workers.
GetPortStatus only reports the current state now, without taking any
real action.

The rh_timeout variable is kept in order to define a minimum time gap
between reset and resume only.

FWIW, in my case, a Verbatim "STORE N GO" mass storage device won't
resume cleanly without this patch.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/musb_host.h
drivers/usb/musb/musb_virthub.c