diff options
author | Daniel Mack <zonque@gmail.com> | 2013-12-18 20:23:46 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-12-19 10:31:11 -0600 |
commit | 8ed1fb790ea24bb223e3b30e2b22bccf5b0a76c9 (patch) | |
tree | eaa291bdb62bc8773df7f62d760c8ecf6fa25a65 /drivers/usb/musb/musb_host.h | |
parent | 56b1b909d7afa5e0415363fafec3df0fc34b95c5 (diff) | |
download | op-kernel-dev-8ed1fb790ea24bb223e3b30e2b22bccf5b0a76c9.zip op-kernel-dev-8ed1fb790ea24bb223e3b30e2b22bccf5b0a76c9.tar.gz |
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>
Diffstat (limited to 'drivers/usb/musb/musb_host.h')
-rw-r--r-- | drivers/usb/musb/musb_host.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_host.h b/drivers/usb/musb/musb_host.h index 7436c24..909ba49 100644 --- a/drivers/usb/musb/musb_host.h +++ b/drivers/usb/musb/musb_host.h @@ -94,6 +94,7 @@ extern void musb_host_resume_root_hub(struct musb *musb); extern void musb_host_poke_root_hub(struct musb *musb); extern void musb_port_suspend(struct musb *musb, bool do_suspend); extern void musb_port_reset(struct musb *musb, bool do_reset); +extern void musb_host_finish_resume(struct work_struct *work); #else static inline struct musb *hcd_to_musb(struct usb_hcd *hcd) { @@ -125,6 +126,7 @@ static inline void musb_host_poll_rh_status(struct musb *musb) {} static inline void musb_host_poke_root_hub(struct musb *musb) {} static inline void musb_port_suspend(struct musb *musb, bool do_suspend) {} static inline void musb_port_reset(struct musb *musb) {} +static inline void musb_host_finish_resume(struct work_struct *work) {} #endif struct usb_hcd; |