
Hi Kevin,
On 25/01/2023 23:50, Kevin Hilman wrote:
Niel Fourie lusus@denx.de writes:
Split out _usb_eth_start() from _usb_eth_init() and usb_eth_stop() from _usb_eth_halt(). Now _usb_eth_init() only initialises and registers the gadget device, which _usb_eth_halt() reverses, and together are used for probing and removing the device. The _usb_eth_start() and _usb_eth_stop() functions connect and disconnect the gadget as expected by the start()/stop() callbacks.
Previously the gadget device was probed on every start() and removed on every stop(), which is inconsistent with other DM_ETH drivers.
By suggestion from Marek, I was testing this patch and discovered that it broke fastboot over USB support. With this patch applied on top of v2022.10, I'm seeing:
=> fastboot 0 couldn't find an available UDC g_dnl_register: failed!, error: -19
Kevin
Thank you very much! That is another use case that I have not thought about and I will look into it. Unfortunately the side effects of the patch is not trivial, so I highly appreciate the feedback.
Best regards, Niel Fourie