[PATCH v2] usb: gadget: ether: split start/stop from init/halt
Marek Vasut
marex at denx.de
Fri Jan 20 19:42:24 CET 2023
On 1/20/23 18:15, Niel Fourie wrote:
[...]
Same question as in V1 below.
> +static int _usb_eth_start(struct ether_priv *priv)
> +{
> + unsigned long timeout = USB_CONNECT_TIMEOUT;
> + struct eth_dev *dev = &priv->ethdev;
> + unsigned long ts;
>
> + if (!dev->gadget)
> + return -1;
> +
> + dev->network_started = 0;
Will this work on systems which already have netconsole active ? I think
this would break the netconsole connection, since the network would be
reinitialized, won't it ?
I would expect this assignment to be in _init and _stop , not in _start
callback.
But I wonder whether the current ethernet uclass interface running code
does not make the entire network_started mechanism obsolete. See the
patch which you referenced previously in related patch:
fa795f45254 ("net: eth-uclass: avoid running start() twice without stop()")
More information about the U-Boot
mailing list