[PATCH] phy: microchip: build both SerDes drivers when they share a config value
Yufeng Gao
yufeng.gao at canonical.com
Thu Nov 26 06:05:21 PST 2026
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 at vger.kernel.org
Signed-off-by: Yufeng Gao <yufeng.gao at canonical.com>
---
drivers/phy/microchip/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/microchip/Makefile b/drivers/phy/microchip/Makefile
index fd73b87960a5..0ea4004abf75 100644
--- a/drivers/phy/microchip/Makefile
+++ b/drivers/phy/microchip/Makefile
@@ -3,5 +3,5 @@
# Makefile for the Microchip phy drivers.
#
-obj-$(CONFIG_PHY_SPARX5_SERDES) := sparx5_serdes.o
-obj-$(CONFIG_PHY_LAN966X_SERDES) := lan966x_serdes.o
+obj-$(CONFIG_PHY_SPARX5_SERDES) += sparx5_serdes.o
+obj-$(CONFIG_PHY_LAN966X_SERDES) += lan966x_serdes.o
base-commit: e7d2f93a4426ea6b33dbca1ce585a9876e3a7344
--
2.53.0
More information about the linux-phy
mailing list