Thu, May 17, 2018 at 04:48:28PM CEST, and...@lunn.ch wrote:
>> >Yes, modprobe dsa-loop-bdinfo first, which will create the
>> 
>> That is compiled inside "fixed_phy", isn't it?
>
>Nope.
>
>It follows a pattern seen with I2C and SPI subsystem. A bus driver
>provides a bus to Linux. But i2c and SPI, unlike PCI or USB, you
>cannot enumerate the devices on the bus, you need to know what devices
>are there. So the board file registers an info structure, listing what
>devices are on the bus. When the bus pops into existence, the core
>links the bus to the info structure about devices on the bus and then
>probes the devices.
>
>The same is happening here. The fixed_phy driver provides an MDIO bus.
>
>The info structure in dsa-loop-bdinfo says there is an dsa-loop device
>at address 31 on that bus.
>
>Combine the two causes the dsa-loop device to actually probe.

I understand. Yet I have no dsa_loop_bdinfo.ko module. In my .config I
have:
CONFIG_FIXED_PHY=y
CONFIG_NET_DSA_LOOP=m

I had to do this:

diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile
index 15c2a831edf1..2d773d3a7d49 100644
--- a/drivers/net/dsa/Makefile
+++ b/drivers/net/dsa/Makefile
@@ -2,9 +2,7 @@
 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
-ifdef CONFIG_NET_DSA_LOOP
-obj-$(CONFIG_FIXED_PHY)                += dsa_loop_bdinfo.o
-endif
+obj-$(CONFIG_NET_DSA_LOOP)     += dsa_loop_bdinfo.o
 obj-$(CONFIG_NET_DSA_MT7530)   += mt7530.o
 obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
 obj-$(CONFIG_NET_DSA_QCA8K)    += qca8k.o

Now dsa_loop_bdinfo.ko gets compiled. I have no clue why it does not
work without the patch :O "obj-$(CONFIG_FIXED_PHY)" doesn't work.

Reply via email to