[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180517163739.GV1972@nanopsycho>
Date: Thu, 17 May 2018 18:37:39 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: Andrew Lunn <andrew@...n.ch>
Cc: Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org,
davem@...emloft.net, idosch@...lanox.com,
jakub.kicinski@...ronome.com, mlxsw@...lanox.com,
vivien.didelot@...oirfairelinux.com, michael.chan@...adcom.com,
ganeshgr@...lsio.com, saeedm@...lanox.com,
simon.horman@...ronome.com, pieter.jansenvanvuuren@...ronome.com,
john.hurley@...ronome.com, dirk.vandermerwe@...ronome.com,
alexander.h.duyck@...el.com, ogerlitz@...lanox.com,
dsahern@...il.com, vijaya.guvva@...ium.com,
satananda.burla@...ium.com, raghu.vatsavayi@...ium.com,
felix.manlunas@...ium.com, gospo@...adcom.com,
sathya.perla@...adcom.com, vasundhara-v.volam@...adcom.com,
tariqt@...lanox.com, eranbe@...lanox.com,
jeffrey.t.kirsher@...el.com
Subject: Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa
ports
Thu, May 17, 2018 at 04:48:28PM CEST, andrew@...n.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.
Powered by blists - more mailing lists