netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Ong Boon Leong <boon.leong.ong@intel.com>
Subject: Re: [PATCH net-next] net: pcs: xpcs: depends on PHYLINK in Kconfig
Date: Wed, 22 Jun 2022 08:35:21 -0700	[thread overview]
Message-ID: <20220622083521.0de3ea5c@kernel.org> (raw)
In-Reply-To: <YrMkEp6EWDvd3GT/@shell.armlinux.org.uk>

On Wed, 22 Jun 2022 15:15:46 +0100 Russell King (Oracle) wrote:
> > We can't use depends with PHYLINK, AFAIU, because PHYLINK is not 
> > a user-visible knob. Its always "select"ed and does not show up
> > in {x,n,menu}config.  
> 
> I'm not sure I understand the point you're making. You seem to be
> saying we can't use "depend on PHYLINK" for this PCS driver, but
> then you sent a patch doing exactly that.

Nuh uh, I sent a patch which does _select_ PHYLINK.

My concern is that since PHYLINK is not visible user will not be able
to see PCS_XPCS unless something else already enabled PHYLINK.

I may well be missing some higher level relations here, on the surface
"depending" on a symbol which is not user-visible seems.. unusual.

> As these PCS drivers are only usable if PHYLINK is already enabled,
> there is a clear dependency between them and phylink. The drivers
> that make use of xpcs are:
> 
> stmmac, which selects both PCS_XPCS and PHYLINK.
> sja1105 (dsa driver), which selects PCS_XPCS. All DSA drivers depend
> on NET_DSA, and NET_DSA selects PHYLINK.
> 
> So, for PCS_XPCS, PHYLINK will be enabled whenever PCS_XPCS is
> selected. No other drivers in drivers/net appear to make use of
> the XPCS driver (I couldn't find any other references to
> xpcs_create()) so using "depends on PHYLINK" for it should be safe.
> 
> Moreover, the user-visible nature of PCS_XPCS doesn't add anything
> to the kernel - two drivers require PCS_XPCS due to code references
> to the xpcs code, these two select that symbol. Offering it to the
> user just gives the user an extra knob to twiddle with no useful
> result (other than more files to be built.)
> 
> It could be argued that it helps compile coverage, which I think is
> the only reason to make PCS_XPCS visible... but then we get compile
> coverage when stmmac or sja1105 are enabled.

Interesting, hiding PCS_XPCS sounds good then. PCS_LYNX is not visible.

diff --git a/drivers/net/pcs/Kconfig b/drivers/net/pcs/Kconfig
index 22ba7b0b476d..9eb32220efea 100644
--- a/drivers/net/pcs/Kconfig
+++ b/drivers/net/pcs/Kconfig
@@ -6,7 +6,7 @@
 menu "PCS device drivers"
 
 config PCS_XPCS
-	tristate "Synopsys DesignWare XPCS controller"
+	tristate
 	depends on MDIO_DEVICE && MDIO_BUS
 	help
 	  This module provides helper functions for Synopsys DesignWare XPCS

  reply	other threads:[~2022-06-22 15:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21  7:55 [PATCH net-next] net: pcs: xpcs: depends on PHYLINK in Kconfig Paolo Abeni
2022-06-21 19:50 ` Jakub Kicinski
2022-06-22 13:50   ` Paolo Abeni
2022-06-22 14:15   ` Russell King (Oracle)
2022-06-22 15:35     ` Jakub Kicinski [this message]
2022-06-22 15:42       ` Paolo Abeni
2022-06-22 23:12         ` Jakub Kicinski
2022-06-23 14:00           ` Paolo Abeni
  -- strict thread matches above, loose matches on Subject: below --
2022-06-23 20:29 Jakub Kicinski
2022-06-25  6:00 ` patchwork-bot+netdevbpf

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=20220622083521.0de3ea5c@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).