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

Marek Vasut marex at denx.de
Mon Dec 12 17:46:47 CET 2022


On 12/12/22 16:29, Niel Fourie wrote:
> 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. For non-DM gadget drivers the old behaviour has been
> retained.

Does this mean the udevice pointer and associated private date are 
retained during the entire operation of the USB gadget , i.e. even 
between stop/start cycles ?


More information about the U-Boot mailing list