Hi Peter, > . > > > > > > > I'm not sure if I understand you correctly. > > First part of the debug output shows only g_webcam and fsl_usb2_udc > > binding process. The USB cord is not plugged into my PC. > > As shown by: > > [fsl_pullup]: PULLUP OFF (this is one of my printks in fsl_udc_core) > > enumeration shouldn't start, but as you can see in the second part or > > the debug output, as soon as I plug the USB cord into my PC, enumeration > > process starts. I'm running _NO_ user-space program, so I'm not worried > > about " g_webcam gadget: setup complete --> -108, 0/0" (I'll be worried > > about this later, because when running my user-space program I get a > > similar problem). > > > > Get it! > Please print usbcmd after "fsl-usb2-udc: bind to driver g_webcam" > to know if usbcmd.rs is 0 or 1. > > According to your log, it should be 1, then add debug log at which set > usbcmd.rs > at fsl_udc_core.c. I was just doing that :-) and have found why enumeration takes place. Looking at /proc/driver/fsl_usb2_udc I see: - when fsl_usb2_udc is modprobed -> Run/Stop = 0 - when g_webcam is modprobed -> Run/Stop = 1 So there is some point where USB_CMD_RUN_STOP was set into dr_regs->usbcmd. I don't know how I did miss this, but it's clearly stated in: 348 /* Enable DR irq and set controller to run state */ 349 static void dr_controller_run(struct fsl_udc *udc) ..... ..... 368 /* Set controller to Run */ 369 temp = fsl_readl(&dr_regs->usbcmd); 370 temp |= USB_CMD_RUN_STOP; 371 fsl_writel(temp, &dr_regs->usbcmd); ..... ..... If I supress these 3 lines, enumeration doesn't start until I open /dev/video0 from my test app. This looks to be running OK but I don't know the collateral effects of this change. Could you take a look at this?? Gonzalo. -- 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