usb: musb: log VBUS error
Subsystems (2)
PATCH 1/1 usb: musb: log VBUS error
VBUS_ERROR is a serious error that the driver often doesn't recover from in my tests, so we should at least inform the user about it.
--- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/musb/musb_core.c +2 -1
@@ -602,7 +602,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,break ; } - dev_dbg(musb->controller, "VBUS_ERROR in %s (%02x, %s), retry #%d, port1 %08x\n", + dev_printk(ignore ? KERN_DEBUG : KERN_ERR, musb->controller, + "VBUS_ERROR in %s (%02x, %s), retry #%d, port1 %08x\n", otg_state_string(musb->xceiv->state), devctl, ({ char *s;
Signature · 1 line
1.7.9.5
A message that is not in the archive (sent off-list or not yet received): 1362876568-7082-1-git-send-email-notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 2 lines · Grazvydas Ignotas
VBUS_ERRORis a serious error that the driver often doesn't recover from in my tests, so we should at least inform the user about it.
Patch makes sens to me, just a related question..
Do you get this when trying to enable the host mode, right? Or have you seen this in other situations too?
If the error happens when enabling the host mode, my experience is that the VBUS_ERROR is caused by the musb trying to be too smart and doing the timeouts automatically. If the VBUS on the hardware does not raise fast enough to the right range for whatever reason, musb can produce this error.
Regards,
Tony
Quoted 26 lines
Signed-off-by Grazvydas Ignotas <[email protected]>--- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/usb/musb/musb_core.c +2
-1@@ -602,7 +602,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,break ; } - dev_dbg(musb->controller, "VBUS_ERROR in %s (%02x, %s), retry #%d, port1 %08x\n", + dev_printk(ignore ? KERN_DEBUG : KERN_ERR, musb->controller, + "VBUS_ERROR in %s (%02x, %s), retry #%d, port1 %08x\n", otg_state_string(musb->xceiv->state), devctl, ({ char *s;Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Tony Lindgren
Quoted 2 lines · Grazvydas Ignotas
VBUS_ERRORis a serious error that the driver often doesn't recover from in my tests, so we should at least inform the user about it.Patch makes sens to me, just a related question..
Do you get this when trying to enable the host mode, right? Or have you seen this in other situations too?
I sometimes see it when booting with cable connected to PC or connecting cable to PC after using a host adapter. In those cases OTG port dies completely until a powercycle :(
Quoted 5 lines
If the error happens when enabling the host mode, my experience is that the
VBUS_ERRORis caused by the musb trying to be too smart and doing the timeouts automatically. If the VBUS on the hardware does not raise fast enough to the right range for whatever reason, musb can produce this error.
Yeah the driver seems to expect that and has a "ignore" variable, I use KERN_DEBUG level in case it's set.
Quoted 5 lines
Regards,
Tony
Signature · 5 lines
Gražvydas -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CANOLnOOp0xHq6KP3yNPYhneuxUtCy4w1tBQjw1kW7UHibV1_0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 5 lines · Grazvydas Ignotas
Quoted 4 lines · Tony Lindgren
Quoted 2 lines · Grazvydas Ignotas
VBUS_ERRORis a serious error that the driver often doesn't recover from in my tests, so we should at least inform the user about it.
Quoted 8 lines
Quoted 4 lines
Patch makes sens to me, just a related question..
Do you get this when trying to enable the host mode, right? Or have you seen this in other situations too?
I sometimes see it when booting with cable connected to PC or connecting cable to PC after using a host adapter. In those cases OTG port dies completely until a powercycle :(
Hmm OK. I suspect there's some kernel bug currently with the OTG id pin detection where it's initial state during the boot is ignored. But replugging the cable should fix that, and in your case it sounds like that's not the case.
Quoted 8 lines
Quoted 5 lines
If the error happens when enabling the host mode, my experience is that the
VBUS_ERRORis caused by the musb trying to be too smart and doing the timeouts automatically. If the VBUS on the hardware does not raise fast enough to the right range for whatever reason, musb can produce this error.Yeah the driver seems to expect that and has a "ignore" variable, I use
KERN_DEBUGlevel in case it's set.
Yes in the host case I think we then just retry enabling the session bit and don't have anything in place to check that the VBUS regulator is ready or not. Have not looked at that code for a while though.
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html