Skip to contentSkip to conversation

net: dsa: Fix functional dsa-loop dependency on FIXED_PHY

PATCH Applied Florian Fainelli 2 participants 2 messages Mar 21, 2018 – Mar 22, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: Fix functional dsa-loop dependency on FIXED_PHY

We have a functional dependency on the FIXED_PHY MDIO bus because we register fixed PHY devices "the old way" which only works if the code that does this has had a chance to run before the fixed MDIO bus is probed. Make sure we account for that and have dsa_loop_bdinfo.o be either built-in or modular depending on whether CONFIG_FIXED_PHY reflects that too.

Fixes 98cd1552ea27 ("net: dsa: Mock-up driver")
---
 drivers/net/dsa/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/dsa/Makefile +4 -1
index d040aeb45172..15c2a831edf1 100644
@@ -1,7 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_NET_DSA_BCM_SF2)	+= bcm-sf2.o
 bcm-sf2-objs			:= bcm_sf2.o bcm_sf2_cfp.o
-obj-$(CONFIG_NET_DSA_LOOP)	+= dsa_loop.o dsa_loop_bdinfo.o
+obj-$(CONFIG_NET_DSA_LOOP)	+= dsa_loop.o
+ifdef CONFIG_NET_DSA_LOOP
+obj-$(CONFIG_FIXED_PHY)		+= dsa_loop_bdinfo.o
+endif
 obj-$(CONFIG_NET_DSA_MT7530)	+= mt7530.o
 obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
 obj-$(CONFIG_NET_DSA_QCA8K)	+= qca8k.o
Signature · 1 line
2.14.1
maintainer Applied
#1 lore raw

From: Florian Fainelli <[email protected]>
Date: Tue, 20 Mar 2018 17:31:10 -0700

Quoted 8 lines

We have a functional dependency on the FIXED_PHY MDIO bus because we register fixed PHY devices "the old way" which only works if the code that does this has had a chance to run before the fixed MDIO bus is probed. Make sure we account for that and have dsa_loop_bdinfo.o be either built-in or modular depending on whether CONFIG_FIXED_PHY reflects that too.

Fixes 98cd1552ea27 ("net: dsa: Mock-up driver")

Applied, thanks Florian.