Re: [PATCH v2] net: dsa: qca8k: fix led devicename when using external mdio bus

From: Andrew Lunn
Date: Fri Apr 25 2025 - 17:15:43 EST


On Fri, Apr 25, 2025 at 01:19:28PM +0400, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@xxxxxxxxxxx>
>
> The qca8k dsa switch can use either an external or internal mdio bus.
> This depends on whether the mdio node is defined under the switch node
> itself and, as such, the internal_mdio_mask is populated with its
> internal phys. Upon registering the internal mdio bus, the slave_mii_bus
> of the dsa switch is assigned to this bus. When an external mdio bus is
> used, it is left unassigned, though its id is used to create the device
> names of the leds.
> This leads to the leds being named '(efault):00:green:lan' and so on as
> the slave_mii_bus is null. So let's fix this by adding a null check and
> use the devicename of the external bus instead when an external bus is
> configured.
>
> Signed-off-by: George Moussalem <george.moussalem@xxxxxxxxxxx>

Before merging this, i think we need to finish the discussion here:

https://patchwork.kernel.org/project/netdevbpf/patch/20250425151309.30493-1-kabel@xxxxxxxxxx/

It might be the whole internal/external bus is going away...

Andrew

---
pw-bot: cr