[PATCH v2] usb: gadget: ether: split start/stop from init/halt

Kevin Hilman khilman at baylibre.com
Wed Jan 25 23:50:17 CET 2023


Niel Fourie <lusus at 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


More information about the U-Boot mailing list