On Wed, Sep 22, 2010 at 4:21 PM, Felipe Balbi <balbi@xxxxxx> wrote: > On Wed, Sep 22, 2010 at 05:25:25AM -0500, Maulik Mankad wrote: >> >> On Wed, Sep 22, 2010 at 3:04 PM, Heikki Krogerus >> <ext-heikki.krogerus@xxxxxxxxx> wrote: >>> >>> If I remove the 0mA condition, I'm seeing first 100mA notification >>> then 0, 100 again and finally 500 from the configuration. This is a lot >>> of notifications, but I guess you are correct. Let's remove all >>> conditions. >>> >> >> Yes its true. I also see these notifications in this order >> (100,0,100,500). >> >> It seems we get two RESET interrupts. On the first Reset >> musb->g.speed is set to some value other than USB_SPEED_UNKNOWN. >> >> When second Reset occurs due to the below code musb_g_disconnect() >> gets called which is why we see that 0mA notification. >> >> /* Code snippet from musb_g_reset() function */ >> if (musb->g.speed != USB_SPEED_UNKNOWN) { >> musb_g_disconnect(musb); >> } > > ok, so the actual fault is the wrong gadget speed on first RESET irq. We > need to track that down. I think you misunderstood my comment above. Its because we get two RESET irqs and the code snippet above. On the first Reset irq musb->g.speed is set to 3 (USB_SPEED_HIGH) which is right. On the second irq as per the above code g.speed is not USB_SPEED_UNKNOWN since it is set to 3 by the first Reset irq and hence it calls musb_g_disconnect(). Hope this clears why we see that 0mA notification. Maulik -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html