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

2023-01-26 Thread Niel Fourie
Hi Kevin, On 25/01/2023 23:50, Kevin Hilman wrote: Niel Fourie 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 probi

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

2023-01-25 Thread Kevin Hilman
Niel Fourie 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_star

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

2023-01-23 Thread Niel Fourie
Hi Marek On 20/01/2023 19:42, Marek Vasut wrote: 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;

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

2023-01-20 Thread Marek Vasut
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) + re

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

2023-01-20 Thread Niel Fourie
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() function