[PATCH 6/7] musb_hdrc: Keep state as b_idle if disconnected as b_idle

Tony Lindgren
2007-08-17T11:44:43Z

Otherwise OPT FS B TD.5.6 can fail.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/usb/musb/musb_gadget.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 86a256a..88757ce 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1962,6 +1962,8 @@ void musb_g_disconnect(struct musb *musb)
switch (musb->xceiv.state) {
default:
#ifdef CONFIG_USB_MUSB_OTG
+ DBG(2, "Unhandled disconnect %s, setting a_idle\n",
+ otg_state_string(musb));
musb->xceiv.state = OTG_STATE_A_IDLE;
break;
case OTG_STATE_A_PERIPHERAL:
@@ -1971,6 +1973,7 @@ void musb_g_disconnect(struct musb *musb)
case OTG_STATE_B_HOST:
#endif
case OTG_STATE_B_PERIPHERAL:
+ case OTG_STATE_B_IDLE:
musb->xceiv.state = OTG_STATE_B_IDLE;
break;
case OTG_STATE_B_SRP_INIT:
--
1.5.2.3