public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] USB: musb: add two states to handle vbus error
@ 2010-03-15 10:23 Wang Hui
  2010-03-15 10:23 ` [PATCH 2/2] USB: musb: omap2430: add mode change from A to B Wang Hui
  2010-03-16 10:49 ` [PATCH 1/2] USB: musb: add two states to handle vbus error wanghui
  0 siblings, 2 replies; 10+ messages in thread
From: Wang Hui @ 2010-03-15 10:23 UTC (permalink / raw)
  To: linux-arm-kernel

When the MUSB is configured as host mode or OTG mode, the xceiv->state
will be set to OTG_STATE_A_IDLE or OTG_STATE_B_IDLE unconditionally
during init process. These init states can change to other
states When the MUSB module detects id pin change, devices connect or
disconnect.
But on some platforms(omap2, omap3), the id pin change
can't raise IRQ request to the MUSB module, so on these platforms,
the init xceiv->state will be A_IDLE or B_IDLE. Under this condition,
when we want the MUSB to act as a host and hotplug a usb device in
mini-B side of the cable, the MUSB will have a possibility to suffer
power underrun under A_IDLE or B_IDLE state, So here adding these
two states under which we can handle VBUSERROR IRQ.

Signed-off-by: Wang Hui <Hui.Wang@windriver.com>
---
 drivers/usb/musb/musb_core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index b4bbf8f..655413c 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -516,6 +516,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
 			 * another reset is due (at least for high speed,
 			 * to redo the chirp etc), it might work OK...
 			 */
+		case OTG_STATE_A_IDLE:
+		case OTG_STATE_B_IDLE:
 		case OTG_STATE_A_WAIT_BCON:
 		case OTG_STATE_A_WAIT_VRISE:
 			if (musb->vbuserr_retry) {
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-23  4:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15 10:23 [PATCH 1/2] USB: musb: add two states to handle vbus error Wang Hui
2010-03-15 10:23 ` [PATCH 2/2] USB: musb: omap2430: add mode change from A to B Wang Hui
2010-03-15 11:22   ` Sergei Shtylyov
2010-03-15 16:10     ` Felipe Balbi
2010-03-16 10:13       ` wanghui
2010-03-16 14:46         ` Felipe Balbi
2010-07-22 15:16   ` Kan-Ru Chen
2010-07-22 16:40     ` Felipe Balbi
2010-07-23  4:38       ` Kan-Ru Chen
2010-03-16 10:49 ` [PATCH 1/2] USB: musb: add two states to handle vbus error wanghui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox