* [PATCH net-next 0/3] net: net: add negotiation of in-band capabilities (remainder)
@ 2024-12-05 9:42 Russell King (Oracle)
2024-12-05 9:42 ` [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method Russell King (Oracle)
2024-12-08 2:00 ` [PATCH net-next 0/3] net: net: add negotiation of in-band capabilities (remainder) patchwork-bot+netdevbpf
0 siblings, 2 replies; 10+ messages in thread
From: Russell King (Oracle) @ 2024-12-05 9:42 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Alexander Couzens, AngeloGioacchino Del Regno, Daniel Golle,
David S. Miller, Eric Dumazet, Ioana Ciornei, Jakub Kicinski,
Jose Abreu, linux-arm-kernel, linux-mediatek, Matthias Brugger,
netdev, Paolo Abeni
Hi,
Here are the last three patches which were not included in the non-RFC
posting, but were in the RFC posting. These add the .pcs_inband()
method to the Lynx, MTK Lynx and XPCS drivers.
drivers/net/pcs/pcs-lynx.c | 22 ++++++++++++++++++++++
drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
drivers/net/pcs/pcs-xpcs.c | 28 ++++++++++++++++++++++++++++
3 files changed, 66 insertions(+)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
2024-12-05 9:42 [PATCH net-next 0/3] net: net: add negotiation of in-band capabilities (remainder) Russell King (Oracle)
@ 2024-12-05 9:42 ` Russell King (Oracle)
2024-12-08 3:01 ` Daniel Golle
2024-12-17 7:49 ` Eric Woudstra
2024-12-08 2:00 ` [PATCH net-next 0/3] net: net: add negotiation of in-band capabilities (remainder) patchwork-bot+netdevbpf
1 sibling, 2 replies; 10+ messages in thread
From: Russell King (Oracle) @ 2024-12-05 9:42 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Alexander Couzens, Daniel Golle, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, netdev, linux-arm-kernel,
linux-mediatek
Report the PCS in-band capabilities to phylink for the LynxI PCS.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
index 4f63abe638c4..7de804535229 100644
--- a/drivers/net/pcs/pcs-mtk-lynxi.c
+++ b/drivers/net/pcs/pcs-mtk-lynxi.c
@@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
return container_of(pcs, struct mtk_pcs_lynxi, pcs);
}
+static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
+ phy_interface_t interface)
+{
+ switch (interface) {
+ case PHY_INTERFACE_MODE_1000BASEX:
+ case PHY_INTERFACE_MODE_2500BASEX:
+ case PHY_INTERFACE_MODE_SGMII:
+ case PHY_INTERFACE_MODE_QSGMII:
+ return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE;
+
+ default:
+ return 0;
+ }
+}
+
static void mtk_pcs_lynxi_get_state(struct phylink_pcs *pcs,
struct phylink_link_state *state)
{
@@ -241,6 +256,7 @@ static void mtk_pcs_lynxi_disable(struct phylink_pcs *pcs)
}
static const struct phylink_pcs_ops mtk_pcs_lynxi_ops = {
+ .pcs_inband_caps = mtk_pcs_lynxi_inband_caps,
.pcs_get_state = mtk_pcs_lynxi_get_state,
.pcs_config = mtk_pcs_lynxi_config,
.pcs_an_restart = mtk_pcs_lynxi_restart_an,
--
2.30.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH net-next 0/3] net: net: add negotiation of in-band capabilities (remainder)
2024-12-05 9:42 [PATCH net-next 0/3] net: net: add negotiation of in-band capabilities (remainder) Russell King (Oracle)
2024-12-05 9:42 ` [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method Russell King (Oracle)
@ 2024-12-08 2:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-08 2:00 UTC (permalink / raw)
To: Russell King
Cc: andrew, hkallweit1, lynxis, angelogioacchino.delregno, daniel,
davem, edumazet, ioana.ciornei, kuba, Jose.Abreu,
linux-arm-kernel, linux-mediatek, matthias.bgg, netdev, pabeni
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 5 Dec 2024 09:42:07 +0000 you wrote:
> Hi,
>
> Here are the last three patches which were not included in the non-RFC
> posting, but were in the RFC posting. These add the .pcs_inband()
> method to the Lynx, MTK Lynx and XPCS drivers.
>
> drivers/net/pcs/pcs-lynx.c | 22 ++++++++++++++++++++++
> drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
> drivers/net/pcs/pcs-xpcs.c | 28 ++++++++++++++++++++++++++++
> 3 files changed, 66 insertions(+)
Here is the summary with links:
- [net-next,1/3] net: pcs: pcs-lynx: implement pcs_inband_caps() method
https://git.kernel.org/netdev/net-next/c/6561f0e547be
- [net-next,2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
https://git.kernel.org/netdev/net-next/c/520d29bdda86
- [net-next,3/3] net: pcs: xpcs: implement pcs_inband_caps() method
https://git.kernel.org/netdev/net-next/c/484d0170d6c6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
2024-12-05 9:42 ` [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method Russell King (Oracle)
@ 2024-12-08 3:01 ` Daniel Golle
2024-12-08 9:13 ` Russell King (Oracle)
2024-12-17 7:49 ` Eric Woudstra
1 sibling, 1 reply; 10+ messages in thread
From: Daniel Golle @ 2024-12-08 3:01 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, Alexander Couzens, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, netdev, linux-arm-kernel,
linux-mediatek
On Thu, Dec 05, 2024 at 09:42:29AM +0000, Russell King (Oracle) wrote:
> Report the PCS in-band capabilities to phylink for the LynxI PCS.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
> index 4f63abe638c4..7de804535229 100644
> --- a/drivers/net/pcs/pcs-mtk-lynxi.c
> +++ b/drivers/net/pcs/pcs-mtk-lynxi.c
> @@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
> return container_of(pcs, struct mtk_pcs_lynxi, pcs);
> }
>
> +static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
> + phy_interface_t interface)
> +{
> + switch (interface) {
> + case PHY_INTERFACE_MODE_1000BASEX:
> + case PHY_INTERFACE_MODE_2500BASEX:
> + case PHY_INTERFACE_MODE_SGMII:
> + case PHY_INTERFACE_MODE_QSGMII:
QSGMII is not supported by this PCS.
Apart from that looks good to me.
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
2024-12-08 3:01 ` Daniel Golle
@ 2024-12-08 9:13 ` Russell King (Oracle)
2025-01-02 12:26 ` Daniel Golle
0 siblings, 1 reply; 10+ messages in thread
From: Russell King (Oracle) @ 2024-12-08 9:13 UTC (permalink / raw)
To: Daniel Golle
Cc: Andrew Lunn, Heiner Kallweit, Alexander Couzens, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, netdev, linux-arm-kernel,
linux-mediatek
On Sun, Dec 08, 2024 at 03:01:38AM +0000, Daniel Golle wrote:
> On Thu, Dec 05, 2024 at 09:42:29AM +0000, Russell King (Oracle) wrote:
> > Report the PCS in-band capabilities to phylink for the LynxI PCS.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
> > drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
> > index 4f63abe638c4..7de804535229 100644
> > --- a/drivers/net/pcs/pcs-mtk-lynxi.c
> > +++ b/drivers/net/pcs/pcs-mtk-lynxi.c
> > @@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
> > return container_of(pcs, struct mtk_pcs_lynxi, pcs);
> > }
> >
> > +static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
> > + phy_interface_t interface)
> > +{
> > + switch (interface) {
> > + case PHY_INTERFACE_MODE_1000BASEX:
> > + case PHY_INTERFACE_MODE_2500BASEX:
> > + case PHY_INTERFACE_MODE_SGMII:
> > + case PHY_INTERFACE_MODE_QSGMII:
>
> QSGMII is not supported by this PCS.
Well...
- lynx_pcs_get_state(), lynx_pcs_config(), and lynx_pcs_link_up()
include QSGMII in their case statements.
- lynx_pcs_config_giga() refers to QSGMII in a comment, grouping it
with SGMII configuration.
I think if the hardware doesn't support QSGMII, these references to it
should be removed?
I also think that adding a .pcs_validate() method would be a good idea
to reject interface modes that the PCS does not support.
> Apart from that looks good to me.
>
> Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
2024-12-05 9:42 ` [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method Russell King (Oracle)
2024-12-08 3:01 ` Daniel Golle
@ 2024-12-17 7:49 ` Eric Woudstra
2025-01-02 8:59 ` Russell King (Oracle)
1 sibling, 1 reply; 10+ messages in thread
From: Eric Woudstra @ 2024-12-17 7:49 UTC (permalink / raw)
To: Russell King (Oracle), Daniel Golle
Cc: Andrew Lunn, Heiner Kallweit, Alexander Couzens, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, netdev, linux-arm-kernel,
linux-mediatek
On 12/5/24 10:42 AM, Russell King (Oracle) wrote:
> Report the PCS in-band capabilities to phylink for the LynxI PCS.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> Reviewed-by: Daniel Golle <daniel@makrotopia.org>
> ---
> drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
> index 4f63abe638c4..7de804535229 100644
> --- a/drivers/net/pcs/pcs-mtk-lynxi.c
> +++ b/drivers/net/pcs/pcs-mtk-lynxi.c
> @@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
> return container_of(pcs, struct mtk_pcs_lynxi, pcs);
> }
>
> +static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
> + phy_interface_t interface)
> +{
> + switch (interface) {
> + case PHY_INTERFACE_MODE_1000BASEX:
> + case PHY_INTERFACE_MODE_2500BASEX:
Isn't this the place now where to report to phylink, that this PCS does
not support in-band at 2500base-x?
Best regards,
Eric
> + case PHY_INTERFACE_MODE_SGMII:
> + case PHY_INTERFACE_MODE_QSGMII:
> + return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE;
> +
> + default:
> + return 0;
> + }
> +}
> +
> static void mtk_pcs_lynxi_get_state(struct phylink_pcs *pcs,
> struct phylink_link_state *state)
> {
> @@ -241,6 +256,7 @@ static void mtk_pcs_lynxi_disable(struct phylink_pcs *pcs)
> }
>
> static const struct phylink_pcs_ops mtk_pcs_lynxi_ops = {
> + .pcs_inband_caps = mtk_pcs_lynxi_inband_caps,
> .pcs_get_state = mtk_pcs_lynxi_get_state,
> .pcs_config = mtk_pcs_lynxi_config,
> .pcs_an_restart = mtk_pcs_lynxi_restart_an,
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
2024-12-17 7:49 ` Eric Woudstra
@ 2025-01-02 8:59 ` Russell King (Oracle)
2025-01-02 12:32 ` Daniel Golle
0 siblings, 1 reply; 10+ messages in thread
From: Russell King (Oracle) @ 2025-01-02 8:59 UTC (permalink / raw)
To: Eric Woudstra
Cc: Daniel Golle, Andrew Lunn, Heiner Kallweit, Alexander Couzens,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Matthias Brugger, AngeloGioacchino Del Regno, netdev,
linux-arm-kernel, linux-mediatek
On Tue, Dec 17, 2024 at 08:49:58AM +0100, Eric Woudstra wrote:
> On 12/5/24 10:42 AM, Russell King (Oracle) wrote:
> > Report the PCS in-band capabilities to phylink for the LynxI PCS.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > Reviewed-by: Daniel Golle <daniel@makrotopia.org>
> > ---
> > drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
> > index 4f63abe638c4..7de804535229 100644
> > --- a/drivers/net/pcs/pcs-mtk-lynxi.c
> > +++ b/drivers/net/pcs/pcs-mtk-lynxi.c
> > @@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
> > return container_of(pcs, struct mtk_pcs_lynxi, pcs);
> > }
> >
> > +static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
> > + phy_interface_t interface)
> > +{
> > + switch (interface) {
> > + case PHY_INTERFACE_MODE_1000BASEX:
> > + case PHY_INTERFACE_MODE_2500BASEX:
>
> Isn't this the place now where to report to phylink, that this PCS does
> not support in-band at 2500base-x?
No - look at the arguments to this function. What arguments would this
function make a decision whether in-band is supported in any interface
mode?
The correct place is the .pcs_inband_caps(), which from reading the
code, I understood that in-band can be used at 2500base-X with this
PCS. See
https://patch.msgid.link/E1tJ8NR-006L5P-E3@rmk-PC.armlinux.org.uk
which was merged at the beginning of December, and if you are correct,
the patch was wrong.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
2024-12-08 9:13 ` Russell King (Oracle)
@ 2025-01-02 12:26 ` Daniel Golle
2025-01-03 10:55 ` Russell King (Oracle)
0 siblings, 1 reply; 10+ messages in thread
From: Daniel Golle @ 2025-01-02 12:26 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, Alexander Couzens, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, netdev, linux-arm-kernel,
linux-mediatek
On Sun, Dec 08, 2024 at 09:13:11AM +0000, Russell King (Oracle) wrote:
> On Sun, Dec 08, 2024 at 03:01:38AM +0000, Daniel Golle wrote:
> > On Thu, Dec 05, 2024 at 09:42:29AM +0000, Russell King (Oracle) wrote:
> > > Report the PCS in-band capabilities to phylink for the LynxI PCS.
> > >
> > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > ---
> > > drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
> > > 1 file changed, 16 insertions(+)
> > >
> > > diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
> > > index 4f63abe638c4..7de804535229 100644
> > > --- a/drivers/net/pcs/pcs-mtk-lynxi.c
> > > +++ b/drivers/net/pcs/pcs-mtk-lynxi.c
> > > @@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
> > > return container_of(pcs, struct mtk_pcs_lynxi, pcs);
> > > }
> > >
> > > +static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
> > > + phy_interface_t interface)
> > > +{
> > > + switch (interface) {
> > > + case PHY_INTERFACE_MODE_1000BASEX:
> > > + case PHY_INTERFACE_MODE_2500BASEX:
> > > + case PHY_INTERFACE_MODE_SGMII:
> > > + case PHY_INTERFACE_MODE_QSGMII:
> >
> > QSGMII is not supported by this PCS.
>
> Well...
> - lynx_pcs_get_state(), lynx_pcs_config(), and lynx_pcs_link_up()
> include QSGMII in their case statements.
> - lynx_pcs_config_giga() refers to QSGMII in a comment, grouping it
> with SGMII configuration.
These functions are in pcs-lynx.c and not in pcs-mtk-lynxi.c.
There is no reference to QSGMII anywhere in pcs-mtk-lynxi.c, what made
you assume it would be supported?
>
> I think if the hardware doesn't support QSGMII, these references to it
> should be removed?
>
> I also think that adding a .pcs_validate() method would be a good idea
> to reject interface modes that the PCS does not support.
I can add the pcs_validate function and send the patch doing that to be
included in net-next.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
2025-01-02 8:59 ` Russell King (Oracle)
@ 2025-01-02 12:32 ` Daniel Golle
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Golle @ 2025-01-02 12:32 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Eric Woudstra, Andrew Lunn, Heiner Kallweit, Alexander Couzens,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Matthias Brugger, AngeloGioacchino Del Regno, netdev,
linux-arm-kernel, linux-mediatek
On Thu, Jan 02, 2025 at 08:59:13AM +0000, Russell King (Oracle) wrote:
> On Tue, Dec 17, 2024 at 08:49:58AM +0100, Eric Woudstra wrote:
> > On 12/5/24 10:42 AM, Russell King (Oracle) wrote:
> > > Report the PCS in-band capabilities to phylink for the LynxI PCS.
> > >
> > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > Reviewed-by: Daniel Golle <daniel@makrotopia.org>
> > > ---
> > > drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
> > > 1 file changed, 16 insertions(+)
> > >
> > > diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
> > > index 4f63abe638c4..7de804535229 100644
> > > --- a/drivers/net/pcs/pcs-mtk-lynxi.c
> > > +++ b/drivers/net/pcs/pcs-mtk-lynxi.c
> > > @@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
> > > return container_of(pcs, struct mtk_pcs_lynxi, pcs);
> > > }
> > >
> > > +static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
> > > + phy_interface_t interface)
> > > +{
> > > + switch (interface) {
> > > + case PHY_INTERFACE_MODE_1000BASEX:
> > > + case PHY_INTERFACE_MODE_2500BASEX:
> >
> > Isn't this the place now where to report to phylink, that this PCS does
> > not support in-band at 2500base-x?
>
> No - look at the arguments to this function. What arguments would this
> function make a decision whether in-band is supported in any interface
> mode?
>
> The correct place is the .pcs_inband_caps(), which from reading the
> code, I understood that in-band can be used at 2500base-X with this
> PCS. See
> https://patch.msgid.link/E1tJ8NR-006L5P-E3@rmk-PC.armlinux.org.uk
> which was merged at the beginning of December, and if you are correct,
> the patch was wrong.
Yes, that patch was wrong. Neither is QSGMII supported at all by the
LynxI hardware, nor can in-band-status be used in 2500Base-X mode.
I will send a patch to fix that.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method
2025-01-02 12:26 ` Daniel Golle
@ 2025-01-03 10:55 ` Russell King (Oracle)
0 siblings, 0 replies; 10+ messages in thread
From: Russell King (Oracle) @ 2025-01-03 10:55 UTC (permalink / raw)
To: Daniel Golle
Cc: Andrew Lunn, Heiner Kallweit, Alexander Couzens, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
AngeloGioacchino Del Regno, netdev, linux-arm-kernel,
linux-mediatek
On Thu, Jan 02, 2025 at 12:26:52PM +0000, Daniel Golle wrote:
> On Sun, Dec 08, 2024 at 09:13:11AM +0000, Russell King (Oracle) wrote:
> > On Sun, Dec 08, 2024 at 03:01:38AM +0000, Daniel Golle wrote:
> > > On Thu, Dec 05, 2024 at 09:42:29AM +0000, Russell King (Oracle) wrote:
> > > > Report the PCS in-band capabilities to phylink for the LynxI PCS.
> > > >
> > > > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > > > ---
> > > > drivers/net/pcs/pcs-mtk-lynxi.c | 16 ++++++++++++++++
> > > > 1 file changed, 16 insertions(+)
> > > >
> > > > diff --git a/drivers/net/pcs/pcs-mtk-lynxi.c b/drivers/net/pcs/pcs-mtk-lynxi.c
> > > > index 4f63abe638c4..7de804535229 100644
> > > > --- a/drivers/net/pcs/pcs-mtk-lynxi.c
> > > > +++ b/drivers/net/pcs/pcs-mtk-lynxi.c
> > > > @@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
> > > > return container_of(pcs, struct mtk_pcs_lynxi, pcs);
> > > > }
> > > >
> > > > +static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
> > > > + phy_interface_t interface)
> > > > +{
> > > > + switch (interface) {
> > > > + case PHY_INTERFACE_MODE_1000BASEX:
> > > > + case PHY_INTERFACE_MODE_2500BASEX:
> > > > + case PHY_INTERFACE_MODE_SGMII:
> > > > + case PHY_INTERFACE_MODE_QSGMII:
> > >
> > > QSGMII is not supported by this PCS.
> >
> > Well...
> > - lynx_pcs_get_state(), lynx_pcs_config(), and lynx_pcs_link_up()
> > include QSGMII in their case statements.
> > - lynx_pcs_config_giga() refers to QSGMII in a comment, grouping it
> > with SGMII configuration.
>
> These functions are in pcs-lynx.c and not in pcs-mtk-lynxi.c.
> There is no reference to QSGMII anywhere in pcs-mtk-lynxi.c, what made
> you assume it would be supported?
>
> >
> > I think if the hardware doesn't support QSGMII, these references to it
> > should be removed?
> >
> > I also think that adding a .pcs_validate() method would be a good idea
> > to reject interface modes that the PCS does not support.
>
> I can add the pcs_validate function and send the patch doing that to be
> included in net-next.
With the addition of the supported_interfaces bitmap, there's no point
if all the validation function is doing is checking the interfaces.
The supported_interfaces bitmap takes over that in core phylink code
(and if a MAC supplies a PCS for an interface that is in the MAC's
supported_interfaces bitmap but does not have the interface bit set in
the PCS's supported_interfaces, phylink will produce a kernel message
at error severity before .pcs_validate is called.
At a point in the near future, I will be making the PCS
supported_interfaces mandatory - but in the mean time this patch set
makes it optional.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-01-03 10:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 9:42 [PATCH net-next 0/3] net: net: add negotiation of in-band capabilities (remainder) Russell King (Oracle)
2024-12-05 9:42 ` [PATCH net-next 2/3] net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method Russell King (Oracle)
2024-12-08 3:01 ` Daniel Golle
2024-12-08 9:13 ` Russell King (Oracle)
2025-01-02 12:26 ` Daniel Golle
2025-01-03 10:55 ` Russell King (Oracle)
2024-12-17 7:49 ` Eric Woudstra
2025-01-02 8:59 ` Russell King (Oracle)
2025-01-02 12:32 ` Daniel Golle
2024-12-08 2:00 ` [PATCH net-next 0/3] net: net: add negotiation of in-band capabilities (remainder) patchwork-bot+netdevbpf
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).