From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Marek Beh__n <kabel@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org
Subject: Re: [PATCH RFC net-next 3/6] net: dsa: sja1105: use .mac_select_pcs() interface
Date: Fri, 25 Feb 2022 10:57:40 +0000 [thread overview]
Message-ID: <Yhi2JHfZ+QI95J9V@shell.armlinux.org.uk> (raw)
In-Reply-To: <20220225103913.abn4pc57ow6dy2m6@skbuf>
On Fri, Feb 25, 2022 at 12:39:13PM +0200, Vladimir Oltean wrote:
> On Thu, Feb 24, 2022 at 04:15:26PM +0000, Russell King (Oracle) wrote:
> > Convert the PCS selection to use mac_select_pcs, which allows the PCS
> > to perform any validation it needs, and removes the need to set the PCS
> > in the mac_config() callback, delving into the higher DSA levels to do
> > so.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
>
> Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Thanks.
> > - .phylink_mac_config = sja1105_mac_config,
>
> Deleting sja1105_mac_config() here is safe not because
> phylink_mac_config() stops calling pl->mac_ops->mac_config(), but
> because dsa_port_phylink_mac_config() first checks whether
> ds->ops->phylink_mac_config is implemented, and that is purely an
> artefact of providing a phylib-style ds->ops->adjust_link, right?
Yes and no.
We already have a several DSA drivers that have NULL phylink_mac_config
and that don't provide an adjust_link function. Even if adjust_link was
eventually killed off, the test in dsa_port_phylink_mac_config() would
still be necessary unless all these DSA drivers are updated with a stub
function for it.
Consequently, I view phylink_mac_config in DSA as entirely optional and
that optionality is already very much a part of the DSA interface, even
though that is not the case with the corresponding phylink_mac_ops
.mac_config method.
Moreover, this optionality is a common theme in DSA switch operations
methods.
> Maybe it's worth mentioning.
Given that .phylink_mac_config is already established as being optional
in DSA, does the addition of one more instance need to be explicitly
mentioned?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2022-02-25 10:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 16:14 [PATCH RFC net-next 0/6] net: dsa: sja1105: phylink updates Russell King (Oracle)
2022-02-24 16:15 ` [PATCH RFC net-next 1/6] net: dsa: sja1105: populate supported_interfaces Russell King (Oracle)
2022-02-25 10:18 ` Vladimir Oltean
2022-02-24 16:15 ` [PATCH RFC net-next 2/6] net: dsa: sja1105: remove interface checks Russell King (Oracle)
2022-02-25 10:20 ` Vladimir Oltean
2022-02-24 16:15 ` [PATCH RFC net-next 3/6] net: dsa: sja1105: use .mac_select_pcs() interface Russell King (Oracle)
2022-02-25 10:39 ` Vladimir Oltean
2022-02-25 10:57 ` Russell King (Oracle) [this message]
2022-02-25 11:25 ` Vladimir Oltean
2022-02-24 16:15 ` [PATCH RFC net-next 4/6] net: dsa: sja1105: mark as non-legacy Russell King (Oracle)
2022-02-25 10:40 ` Vladimir Oltean
2022-02-24 16:15 ` [PATCH RFC net-next 5/6] net: dsa: sja1105: convert to phylink_generic_validate() Russell King (Oracle)
2022-02-25 10:44 ` Vladimir Oltean
2022-02-24 16:15 ` [PATCH RFC net-next 6/6] net: dsa: sja1105: support switching between SGMII and 2500BASE-X Russell King (Oracle)
2022-02-25 11:16 ` Vladimir Oltean
2022-02-25 11:23 ` Russell King (Oracle)
2022-02-25 11:27 ` Vladimir Oltean
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=Yhi2JHfZ+QI95J9V@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.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).