usb gadget driver initialization issue

Marek Vasut marex at denx.de
Sat Jul 20 22:11:39 CEST 2024


On 7/20/24 1:21 PM, Zixun Li wrote:
> Hi,

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.

Can you please send an RFC patch ?

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

It is not on the ToDo list, no.

+CC Mattijs


More information about the U-Boot mailing list