Re: [PATCH net-next v4 3/8] net: dsa: move call to driver port_setup after creation of netdev

Vladimir Oltean
2024-04-10T23:50:57Z

On Sat, Apr 06, 2024 at 03:13:30PM -0500, Andrew Lunn wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> The driver-facing method port_setup() is a good place to add the LEDs of
> a port to the netdev representing the port. However, when port_setup()
> is called in dsa_port_devlink_setup(), the netdev does not exist
> yet. That only happens in dsa_user_create(), which is later in
> dsa_port_setup().
>
> Move the call to port_setup() out of dsa_port_devlink_setup() and to
> the end of dsa_port_setup() where the netdev will exist. For the other
> port types, the call to port_setup() and port_teardown() remains where
> it was before (functionally speaking), but now it needs to be open-coded
> in their respective setup/teardown logic.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---

You can keep your author name and me as co-developer. If I changed your
author information it was probably a mistake.