From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports Date: Thu, 17 May 2018 18:37:39 +0200 Message-ID: <20180517163739.GV1972@nanopsycho> References: <20180322105522.8186-1-jiri@resnulli.us> <20180322105522.8186-5-jiri@resnulli.us> <20180323133002.GF5145@lunn.ch> <20180323144914.GA2125@nanopsycho> <20180517140239.GT1972@nanopsycho> <189f0c4d-aacb-73b9-0ff6-9feefe320c46@gmail.com> <20180517143020.GU1972@nanopsycho> <20180517144828.GC23601@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Fainelli , netdev@vger.kernel.org, davem@davemloft.net, idosch@mellanox.com, jakub.kicinski@netronome.com, mlxsw@mellanox.com, vivien.didelot@savoirfairelinux.com, michael.chan@broadcom.com, ganeshgr@chelsio.com, saeedm@mellanox.com, simon.horman@netronome.com, pieter.jansenvanvuuren@netronome.com, john.hurley@netronome.com, dirk.vandermerwe@netronome.com, alexander.h.duyck@intel.com, ogerlitz@mellanox.com, dsahern@gmail.com, vijaya.guvva@cavium.com, satananda.burla@cavium.com, raghu.vatsavayi@cavium.com, felix.manlunas@cavium.com, gospo@broadcom.com, sathya.perla@broadcom.com, vasundhara-v.volam@broadcom.com, tariqt@mellanox.com, eranbe@mellanox.com, jeffrey.t.kirsher@intel.com To: Andrew Lunn Return-path: Received: from mail-wr0-f193.google.com ([209.85.128.193]:41575 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbeEQQhl (ORCPT ); Thu, 17 May 2018 12:37:41 -0400 Received: by mail-wr0-f193.google.com with SMTP id g21-v6so6335162wrb.8 for ; Thu, 17 May 2018 09:37:41 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180517144828.GC23601@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: Thu, May 17, 2018 at 04:48:28PM CEST, andrew@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.