From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Vladimir Oltean <olteanv@gmail.com>,
Sean Anderson <sean.anderson@seco.com>
Cc: Chris Snook <chris.snook@gmail.com>, Felix Fietkau <nbd@nbd.name>,
Florian Fainelli <f.fainelli@gmail.com>,
John Crispin <john@phrozen.org>,
Mark Lee <Mark-MC.Lee@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Michal Simek <michal.simek@xilinx.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>,
Sean Wang <sean.wang@mediatek.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH RFC net-next 8/8] net: phylink: allow PCS to be removed
Date: Tue, 23 Nov 2021 16:08:09 +0000 [thread overview]
Message-ID: <YZ0R6T33DNTW80SU@shell.armlinux.org.uk> (raw)
In-Reply-To: <20211123120825.jvuh7444wdxzugbo@skbuf>
On Tue, Nov 23, 2021 at 02:08:25PM +0200, Vladimir Oltean wrote:
> On Tue, Nov 23, 2021 at 10:00:50AM +0000, Russell King (Oracle) wrote:
> > Allow phylink_set_pcs() to be called with a NULL pcs argument to remove
> > the PCS from phylink. This is only supported on non-legacy drivers
> > where doing so will have no effect on the mac_config() calling
> > behaviour.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
> > drivers/net/phy/phylink.c | 20 +++++++++++++++-----
> > 1 file changed, 15 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> > index a935655c39c0..9f0f0e0aad55 100644
> > --- a/drivers/net/phy/phylink.c
> > +++ b/drivers/net/phy/phylink.c
> > @@ -1196,15 +1196,25 @@ EXPORT_SYMBOL_GPL(phylink_create);
> > * in mac_prepare() or mac_config() methods if it is desired to dynamically
> > * change the PCS.
> > *
> > - * Please note that there are behavioural changes with the mac_config()
> > - * callback if a PCS is present (denoting a newer setup) so removing a PCS
> > - * is not supported, and if a PCS is going to be used, it must be registered
> > - * by calling phylink_set_pcs() at the latest in the first mac_config() call.
> > + * Please note that for legacy phylink users, there are behavioural changes
> > + * with the mac_config() callback if a PCS is present (denoting a newer setup)
> > + * so removing a PCS is not supported. If a PCS is going to be used, it must
> > + * be registered by calling phylink_set_pcs() at the latest in the first
> > + * mac_config() call.
> > + *
> > + * For modern drivers, this may be called with a NULL pcs argument to
> > + * disconnect the PCS from phylink.
> > */
> > void phylink_set_pcs(struct phylink *pl, struct phylink_pcs *pcs)
> > {
> > + if (pl->config->legacy_pre_march2020 && pl->pcs && !pcs) {
> > + phylink_warn(pl,
> > + "Removing PCS is not supported in a legacy driver");
> > + return;
> > + }
> > +
> > pl->pcs = pcs;
> > - pl->pcs_ops = pcs->ops;
> > + pl->pcs_ops = pcs ? pcs->ops : NULL;
> > }
> > EXPORT_SYMBOL_GPL(phylink_set_pcs);
> >
> > --
> > 2.30.2
> >
>
> I've read the discussion at
> https://lore.kernel.org/netdev/cfcb368f-a785-9ea5-c446-1906eacd8c03@seco.com/
> and I still am not sure that I understand what is the use case behind
> removing a PCS?
Passing that to Sean to answer in detail...
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Vladimir Oltean <olteanv@gmail.com>,
Sean Anderson <sean.anderson@seco.com>
Cc: Chris Snook <chris.snook@gmail.com>, Felix Fietkau <nbd@nbd.name>,
Florian Fainelli <f.fainelli@gmail.com>,
John Crispin <john@phrozen.org>,
Mark Lee <Mark-MC.Lee@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Michal Simek <michal.simek@xilinx.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>,
Sean Wang <sean.wang@mediatek.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH RFC net-next 8/8] net: phylink: allow PCS to be removed
Date: Tue, 23 Nov 2021 16:08:09 +0000 [thread overview]
Message-ID: <YZ0R6T33DNTW80SU@shell.armlinux.org.uk> (raw)
In-Reply-To: <20211123120825.jvuh7444wdxzugbo@skbuf>
On Tue, Nov 23, 2021 at 02:08:25PM +0200, Vladimir Oltean wrote:
> On Tue, Nov 23, 2021 at 10:00:50AM +0000, Russell King (Oracle) wrote:
> > Allow phylink_set_pcs() to be called with a NULL pcs argument to remove
> > the PCS from phylink. This is only supported on non-legacy drivers
> > where doing so will have no effect on the mac_config() calling
> > behaviour.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
> > drivers/net/phy/phylink.c | 20 +++++++++++++++-----
> > 1 file changed, 15 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> > index a935655c39c0..9f0f0e0aad55 100644
> > --- a/drivers/net/phy/phylink.c
> > +++ b/drivers/net/phy/phylink.c
> > @@ -1196,15 +1196,25 @@ EXPORT_SYMBOL_GPL(phylink_create);
> > * in mac_prepare() or mac_config() methods if it is desired to dynamically
> > * change the PCS.
> > *
> > - * Please note that there are behavioural changes with the mac_config()
> > - * callback if a PCS is present (denoting a newer setup) so removing a PCS
> > - * is not supported, and if a PCS is going to be used, it must be registered
> > - * by calling phylink_set_pcs() at the latest in the first mac_config() call.
> > + * Please note that for legacy phylink users, there are behavioural changes
> > + * with the mac_config() callback if a PCS is present (denoting a newer setup)
> > + * so removing a PCS is not supported. If a PCS is going to be used, it must
> > + * be registered by calling phylink_set_pcs() at the latest in the first
> > + * mac_config() call.
> > + *
> > + * For modern drivers, this may be called with a NULL pcs argument to
> > + * disconnect the PCS from phylink.
> > */
> > void phylink_set_pcs(struct phylink *pl, struct phylink_pcs *pcs)
> > {
> > + if (pl->config->legacy_pre_march2020 && pl->pcs && !pcs) {
> > + phylink_warn(pl,
> > + "Removing PCS is not supported in a legacy driver");
> > + return;
> > + }
> > +
> > pl->pcs = pcs;
> > - pl->pcs_ops = pcs->ops;
> > + pl->pcs_ops = pcs ? pcs->ops : NULL;
> > }
> > EXPORT_SYMBOL_GPL(phylink_set_pcs);
> >
> > --
> > 2.30.2
> >
>
> I've read the discussion at
> https://lore.kernel.org/netdev/cfcb368f-a785-9ea5-c446-1906eacd8c03@seco.com/
> and I still am not sure that I understand what is the use case behind
> removing a PCS?
Passing that to Sean to answer in detail...
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Vladimir Oltean <olteanv@gmail.com>,
Sean Anderson <sean.anderson@seco.com>
Cc: Chris Snook <chris.snook@gmail.com>, Felix Fietkau <nbd@nbd.name>,
Florian Fainelli <f.fainelli@gmail.com>,
John Crispin <john@phrozen.org>,
Mark Lee <Mark-MC.Lee@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Michal Simek <michal.simek@xilinx.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>,
Sean Wang <sean.wang@mediatek.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH RFC net-next 8/8] net: phylink: allow PCS to be removed
Date: Tue, 23 Nov 2021 16:08:09 +0000 [thread overview]
Message-ID: <YZ0R6T33DNTW80SU@shell.armlinux.org.uk> (raw)
In-Reply-To: <20211123120825.jvuh7444wdxzugbo@skbuf>
On Tue, Nov 23, 2021 at 02:08:25PM +0200, Vladimir Oltean wrote:
> On Tue, Nov 23, 2021 at 10:00:50AM +0000, Russell King (Oracle) wrote:
> > Allow phylink_set_pcs() to be called with a NULL pcs argument to remove
> > the PCS from phylink. This is only supported on non-legacy drivers
> > where doing so will have no effect on the mac_config() calling
> > behaviour.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
> > drivers/net/phy/phylink.c | 20 +++++++++++++++-----
> > 1 file changed, 15 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> > index a935655c39c0..9f0f0e0aad55 100644
> > --- a/drivers/net/phy/phylink.c
> > +++ b/drivers/net/phy/phylink.c
> > @@ -1196,15 +1196,25 @@ EXPORT_SYMBOL_GPL(phylink_create);
> > * in mac_prepare() or mac_config() methods if it is desired to dynamically
> > * change the PCS.
> > *
> > - * Please note that there are behavioural changes with the mac_config()
> > - * callback if a PCS is present (denoting a newer setup) so removing a PCS
> > - * is not supported, and if a PCS is going to be used, it must be registered
> > - * by calling phylink_set_pcs() at the latest in the first mac_config() call.
> > + * Please note that for legacy phylink users, there are behavioural changes
> > + * with the mac_config() callback if a PCS is present (denoting a newer setup)
> > + * so removing a PCS is not supported. If a PCS is going to be used, it must
> > + * be registered by calling phylink_set_pcs() at the latest in the first
> > + * mac_config() call.
> > + *
> > + * For modern drivers, this may be called with a NULL pcs argument to
> > + * disconnect the PCS from phylink.
> > */
> > void phylink_set_pcs(struct phylink *pl, struct phylink_pcs *pcs)
> > {
> > + if (pl->config->legacy_pre_march2020 && pl->pcs && !pcs) {
> > + phylink_warn(pl,
> > + "Removing PCS is not supported in a legacy driver");
> > + return;
> > + }
> > +
> > pl->pcs = pcs;
> > - pl->pcs_ops = pcs->ops;
> > + pl->pcs_ops = pcs ? pcs->ops : NULL;
> > }
> > EXPORT_SYMBOL_GPL(phylink_set_pcs);
> >
> > --
> > 2.30.2
> >
>
> I've read the discussion at
> https://lore.kernel.org/netdev/cfcb368f-a785-9ea5-c446-1906eacd8c03@seco.com/
> and I still am not sure that I understand what is the use case behind
> removing a PCS?
Passing that to Sean to answer in detail...
--
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:[~2021-11-23 16:08 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 9:52 [PATCH RFC net-next 0/8] net: phylink: introduce legacy mode flag Russell King (Oracle)
2021-11-23 9:52 ` Russell King (Oracle)
2021-11-23 9:52 ` Russell King (Oracle)
2021-11-23 10:00 ` [PATCH RFC net-next 1/8] net: dsa: consolidate phylink creation Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` [PATCH RFC net-next 2/8] net: phylink: add legacy_pre_march2020 indicator Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` [PATCH RFC net-next 3/8] net: dsa: mark DSA phylink as legacy_pre_march2020 Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` [PATCH RFC net-next 4/8] net: mtk_eth_soc: mark as a legacy_pre_march2020 driver Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` [PATCH RFC net-next 5/8] net: ag71xx: mark as a legacy_pre_march2020 phylink driver Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 18:05 ` Russell King (Oracle)
2021-11-23 18:05 ` Russell King (Oracle)
2021-11-23 18:05 ` Russell King (Oracle)
2021-11-23 10:00 ` [PATCH RFC net-next 6/8] net: axienet: " Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` [PATCH RFC net-next 7/8] net: phylink: use legacy_pre_march2020 Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` [PATCH RFC net-next 8/8] net: phylink: allow PCS to be removed Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 10:00 ` Russell King (Oracle)
2021-11-23 12:08 ` Vladimir Oltean
2021-11-23 12:08 ` Vladimir Oltean
2021-11-23 12:08 ` Vladimir Oltean
2021-11-23 16:08 ` Russell King (Oracle) [this message]
2021-11-23 16:08 ` Russell King (Oracle)
2021-11-23 16:08 ` Russell King (Oracle)
2021-11-23 17:30 ` Sean Anderson
2021-11-23 17:30 ` Sean Anderson
2021-11-23 17:30 ` Sean Anderson
2021-11-23 18:15 ` Vladimir Oltean
2021-11-23 18:15 ` Vladimir Oltean
2021-11-23 18:15 ` Vladimir Oltean
2021-11-23 19:04 ` Sean Anderson
2021-11-23 19:04 ` Sean Anderson
2021-11-23 19:04 ` Sean Anderson
2021-11-23 19:30 ` Vladimir Oltean
2021-11-23 19:30 ` Vladimir Oltean
2021-11-23 19:30 ` Vladimir Oltean
2021-11-23 19:50 ` Russell King (Oracle)
2021-11-23 19:50 ` Russell King (Oracle)
2021-11-23 19:50 ` Russell King (Oracle)
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=YZ0R6T33DNTW80SU@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Mark-MC.Lee@mediatek.com \
--cc=andrew@lunn.ch \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=michal.simek@xilinx.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=sean.anderson@seco.com \
--cc=sean.wang@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.