Re: [PATCH net-next] net: sparx5: add missing lan969x Kconfig dependency

From: Daniel Machon
Date: Wed Nov 13 2024 - 14:57:26 EST


Hi Arnd,

> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The sparx5 switchdev driver can be built either with or without support
> for the Lan969x switch. However, it cannot be built-in when the lan969x
> driver is a loadable module because of a link-time dependency:
>
> arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/sparx5/sparx5_main.o:(.rodata+0xd44): undefined reference to `lan969x_desc'
>
> Add a Kconfig dependency to reflect this in Kconfig, allowing all
> the valid configurations but forcing sparx5 to be a loadable module
> as well if lan969x is.

Checked the different configurations and the change fixed it. Thanks!

>
> Fixes: 98a01119608d ("net: sparx5: add compatible string for lan969x")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> Side note: given that lan969x is always built as part of sparx5,
> wouldn't it make more sense to move all of it into the sparx5
> subdirectory?
> ---

IDK .. I think I prefer it *not* being hidden under the sparx5 dir. If
we have any guidelines for this, I will gladly comply. :-)

/Daniel

Reviewed-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>