usb gadget driver initialization issue

Zixun Li zli at ogga.fr
Sat Jul 20 13:21:27 CEST 2024


Hi,

In udc_bind_to_driver(), USB device controller is initialized by 
usb_gadget_udc_start() and entered connected state by usb_gadget_connect().

From the host's point of view, a device is ready to be enumerated.
However, since dm_usb_gadget_handle_interrupts() is only called inside 
function driver, at this stage USB events are not managed, host's
enumeration attempts will fail and resulting error like:
    usb 1-1: new high-speed USB device number 50 using xhci_hcd
    usb 1-1: device descriptor read/64, error -110
    usb 1-1: device descriptor read/64, error -110
    usb usb1-port1: attempt power cycle

I think it's better to leave the device in disconnected state while 
probing and connect it once a gadget function is invoked.

I see recently there are many DM related reworking, please forgive me 
if it's already on the Todo list.

--
Zixun LI


More information about the U-Boot mailing list