Re: [PATCH] phy: microchip: build both SerDes drivers when they share a config value

From: Daniel Machon

Date: Fri Nov 27 2026 - 04:58:26 EST


> The Makefile adds the two drivers with ":=" instead of "+=":
>
> obj-$(CONFIG_PHY_SPARX5_SERDES) := sparx5_serdes.o
> obj-$(CONFIG_PHY_LAN966X_SERDES) := lan966x_serdes.o
>
> When PHY_SPARX5_SERDES and PHY_LAN966X_SERDES are both 'y' or 'm',
> both lines assign the same variable and the second replaces the first:
>
> obj-y := sparx5_serdes.o
> obj-y := lan966x_serdes.o
>
> In this case, sparx5_serdes is silently not built despite enabled. To
> fix this, use "+=" (for both drivers).
>
> Fixes: 305524902a00 ("phy: Add lan966x ethernet serdes PHY driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Yufeng Gao <yufeng.gao@xxxxxxxxxxxxx>

The issue is real and the patch fixes it, thanks.

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