netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Russell King \(Oracle\)'" <linux@armlinux.org.uk>
Cc: <netdev@vger.kernel.org>, <jarkko.nikula@linux.intel.com>,
	<andriy.shevchenko@linux.intel.com>,
	<mika.westerberg@linux.intel.com>, <jsd@semihalf.com>,
	<Jose.Abreu@synopsys.com>, <andrew@lunn.ch>,
	<hkallweit1@gmail.com>, <oe-kbuild-all@lists.linux.dev>,
	<linux-i2c@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
	<mengyuanlou@net-swift.com>,
	"'Piotr Raczynski'" <piotr.raczynski@intel.com>
Subject: RE: [PATCH net-next v9 5/9] net: txgbe: Add SFP module identify
Date: Wed, 31 May 2023 17:19:47 +0800	[thread overview]
Message-ID: <046e01d993a1$0b8f51e0$22adf5a0$@trustnetic.com> (raw)
In-Reply-To: <03ac01d992d2$67c1ec90$3745c5b0$@trustnetic.com>

On Tuesday, May 30, 2023 4:41 PM, Jiawen Wu wrote:
> On Monday, May 29, 2023 10:06 AM, Jiawen Wu wrote:
> > On Friday, May 26, 2023 7:37 PM, Russell King (Oracle) wrote:
> > > On Fri, May 26, 2023 at 07:30:45PM +0800, kernel test robot wrote:
> > > > Kconfig warnings: (for reference only)
> > > >    WARNING: unmet direct dependencies detected for I2C_DESIGNWARE_PLATFORM
> > > >    Depends on [n]: I2C [=n] && HAS_IOMEM [=y] && (ACPI && COMMON_CLK [=y] || !ACPI)
> > > >    Selected by [y]:
> > > >    - TXGBE [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PCI [=y]
> > > >    WARNING: unmet direct dependencies detected for SFP
> > > >    Depends on [n]: NETDEVICES [=y] && PHYLIB [=y] && I2C [=n] && PHYLINK [=y] && (HWMON [=n] || HWMON [=n]=n)
> > > >    Selected by [y]:
> > > >    - TXGBE [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_WANGXUN [=y] && PCI [=y]
> > >
> > > ... and is basically caused by "select SFP". No. Do not do this unless
> > > you look at the dependencies for SFP and ensure that those are also
> > > satisfied - because if you don't you create messes like the above
> > > build errors.
> >
> > So how do I make sure that the module I need compiles and loads correctly,
> > rely on the user to manually select it?
> 
> When I changed the TXGBE config to:
> ...
> 	depends on SFP
> 	select PCS_XPCS
> ...
> the compilation gave an error:
> 
> drivers/net/phy/Kconfig:16:error: recursive dependency detected!
> drivers/net/phy/Kconfig:16:     symbol PHYLIB is selected by PHYLINK
> drivers/net/phy/Kconfig:6:      symbol PHYLINK is selected by PCS_XPCS
> drivers/net/pcs/Kconfig:8:      symbol PCS_XPCS is selected by TXGBE
> drivers/net/ethernet/wangxun/Kconfig:40:        symbol TXGBE depends on SFP
> drivers/net/phy/Kconfig:63:     symbol SFP depends on PHYLIB
> For a resolution refer to Documentation/kbuild/kconfig-language.rst
> subsection "Kconfig recursive dependency limitations"
> 
> Seems deleting "depends on SFP" is the correct way. But is this normal?
> How do we ensure the dependency between TXGBE and SFP?

Hi Russell,

Could you please give me some suggestions?

I checked "kconfig-language" doc, the practical solution is that swap all
"select FOO" to "depends on FOO" or swap all "depends on FOO" to
"select FOO". Config PCS_XPCS has to be selected in order to load modules
properly, so how should I fix the warning?


  reply	other threads:[~2023-05-31  9:22 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24  9:17 [PATCH net-next v9 0/9] TXGBE PHYLINK support Jiawen Wu
2023-05-24  9:17 ` [PATCH net-next v9 1/9] net: txgbe: Add software nodes to support phylink Jiawen Wu
2023-05-27  8:44   ` Andy Shevchenko
2023-05-30  6:11     ` Jiawen Wu
2023-05-30 10:45       ` andy.shevchenko
2023-05-24  9:17 ` [PATCH net-next v9 2/9] i2c: designware: Add driver support for Wangxun 10Gb NIC Jiawen Wu
2023-05-27  8:36   ` Andy Shevchenko
2023-05-24  9:17 ` [PATCH net-next v9 3/9] net: txgbe: Register fixed rate clock Jiawen Wu
2023-05-24 12:17   ` Andrew Lunn
2023-05-24  9:17 ` [PATCH net-next v9 4/9] net: txgbe: Register I2C platform device Jiawen Wu
2023-05-26  9:35   ` kernel test robot
2023-05-27  8:38   ` Andy Shevchenko
2023-05-24  9:17 ` [PATCH net-next v9 5/9] net: txgbe: Add SFP module identify Jiawen Wu
2023-05-26 11:30   ` kernel test robot
2023-05-26 11:36     ` Russell King (Oracle)
2023-05-29  2:06       ` Jiawen Wu
2023-05-30  8:40         ` Jiawen Wu
2023-05-31  9:19           ` Jiawen Wu [this message]
2023-05-31  9:47           ` Russell King (Oracle)
2023-05-31 10:11             ` Jiawen Wu
2023-05-24  9:17 ` [PATCH net-next v9 6/9] net: txgbe: Support GPIO to SFP socket Jiawen Wu
2023-05-24 12:51   ` Andrew Lunn
2023-05-24 13:07     ` Russell King (Oracle)
2023-05-24  9:17 ` [PATCH net-next v9 7/9] net: pcs: Add 10GBASE-R mode for Synopsys Designware XPCS Jiawen Wu
2023-05-24  9:17 ` [PATCH net-next v9 8/9] net: txgbe: Implement phylink pcs Jiawen Wu
2023-05-24 12:53   ` Andrew Lunn
2023-05-26  4:14   ` Jakub Kicinski
2023-05-26  6:21     ` Jiawen Wu
2023-05-26  8:43       ` Russell King (Oracle)
2023-05-26  9:01         ` Jiawen Wu
2023-05-26  9:07           ` Russell King (Oracle)
2023-05-26  9:22             ` Jiawen Wu
2023-05-26  9:37               ` Russell King (Oracle)
2023-05-26 10:42                 ` Russell King (Oracle)
2023-05-29  1:57                   ` Jiawen Wu
2023-05-24  9:17 ` [PATCH net-next v9 9/9] net: txgbe: Support phylink MAC layer Jiawen Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='046e01d993a1$0b8f51e0$22adf5a0$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hkallweit1@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mengyuanlou@net-swift.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=piotr.raczynski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).