* [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
@ 2026-02-02 5:28 Alok Tiwari
2026-02-02 9:47 ` [EXTERNAL] " Elad Nachman
2026-02-02 10:26 ` Jonas Gorski
0 siblings, 2 replies; 7+ messages in thread
From: Alok Tiwari @ 2026-02-02 5:28 UTC (permalink / raw)
To: tchornyi, vmytnyk, yevhen.orlov, vkochan, taras.chornyi, pabeni,
kuba, edumazet, davem, andrew+netdev, netdev
Cc: alok.a.tiwarilinux, alok.a.tiwari
In prestera_ethtool_set_fecparam(), the error message is opposite of
the condition checking PRESTERA_PORT_TCVR_SFP. FEC configuration is
not allowed on SFP ports, but the message says "non-SFP ports", which
does not match the condition.
Fix the message to match the condition.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/net/ethernet/marvell/prestera/prestera_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
index 2f52daba58e6..a259da9f30f4 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
@@ -718,7 +718,7 @@ static int prestera_ethtool_set_fecparam(struct net_device *dev,
}
if (port->caps.transceiver == PRESTERA_PORT_TCVR_SFP) {
- netdev_err(dev, "FEC set is not allowed on non-SFP ports\n");
+ netdev_err(dev, "FEC set is not allowed on SFP ports\n");
return -EINVAL;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [EXTERNAL] [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
2026-02-02 5:28 [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports Alok Tiwari
@ 2026-02-02 9:47 ` Elad Nachman
2026-02-02 10:26 ` Jonas Gorski
1 sibling, 0 replies; 7+ messages in thread
From: Elad Nachman @ 2026-02-02 9:47 UTC (permalink / raw)
To: Alok Tiwari, Taras Chornyi [C], Volodymyr Mytnyk [C],
Yevhen Orlov, Vadym Kochan [C], Taras Chornyi, pabeni@redhat.com,
kuba@kernel.org, edumazet@google.com, davem@davemloft.net,
andrew+netdev@lunn.ch, netdev@vger.kernel.org
Cc: alok.a.tiwarilinux@gmail.com
>
>
> From: Alok Tiwari <alok.a.tiwari@oracle.com>
> Sent: Monday, February 2, 2026 7:28 AM
> To: Taras Chornyi [C] <tchornyi@marvell.com>; Volodymyr Mytnyk [C] <vmytnyk@marvell.com>; Yevhen Orlov <yevhen.orlov@plvision.eu>; Vadym Kochan [C] <vkochan@marvell.com>; Taras Chornyi <taras.chornyi@plvision.eu>; pabeni@redhat.com; kuba@kernel.org; edumazet@google.com; davem@davemloft.net; andrew+netdev@lunn.ch; netdev@vger.kernel.org
> Cc: alok.a.tiwarilinux@gmail.com; alok.a.tiwari@oracle.com
> Subject: [EXTERNAL] [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
>
>
> In prestera_ethtool_set_fecparam(), the error message is opposite of
> the condition checking PRESTERA_PORT_TCVR_SFP. FEC configuration is
> not allowed on SFP ports, but the message says "non-SFP ports", which
> does not match the condition.
>
> Fix the message to match the condition.
>
> Signed-off-by: Alok Tiwari <mailto:alok.a.tiwari@oracle.com>
> ---
> drivers/net/ethernet/marvell/prestera/prestera_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> index 2f52daba58e6..a259da9f30f4 100644
> --- a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> +++ b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> @@ -718,7 +718,7 @@ static int prestera_ethtool_set_fecparam(struct net_device *dev,
> }
>
> if (port->caps.transceiver == PRESTERA_PORT_TCVR_SFP) {
> - netdev_err(dev, "FEC set is not allowed on non-SFP ports\n");
> + netdev_err(dev, "FEC set is not allowed on SFP ports\n");
> return -EINVAL;
> }
>
> --
> 2.50.1
>
>
Acked-by: Elad Nachman <enachman@marvell.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
2026-02-02 5:28 [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports Alok Tiwari
2026-02-02 9:47 ` [EXTERNAL] " Elad Nachman
@ 2026-02-02 10:26 ` Jonas Gorski
2026-02-04 3:15 ` Jakub Kicinski
1 sibling, 1 reply; 7+ messages in thread
From: Jonas Gorski @ 2026-02-02 10:26 UTC (permalink / raw)
To: Alok Tiwari, tchornyi, vmytnyk, yevhen.orlov, vkochan,
taras.chornyi, pabeni, kuba, edumazet, davem, andrew+netdev,
netdev
Cc: alok.a.tiwarilinux
Hi,
On 02/02/2026 06:28, Alok Tiwari wrote:
> In prestera_ethtool_set_fecparam(), the error message is opposite of
> the condition checking PRESTERA_PORT_TCVR_SFP. FEC configuration is
> not allowed on SFP ports, but the message says "non-SFP ports", which
> does not match the condition.
>
> Fix the message to match the condition.
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
> drivers/net/ethernet/marvell/prestera/prestera_ethtool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> index 2f52daba58e6..a259da9f30f4 100644
> --- a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> +++ b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> @@ -718,7 +718,7 @@ static int prestera_ethtool_set_fecparam(struct net_device *dev,
> }
>
> if (port->caps.transceiver == PRESTERA_PORT_TCVR_SFP) {
> - netdev_err(dev, "FEC set is not allowed on non-SFP ports\n");
> + netdev_err(dev, "FEC set is not allowed on SFP ports\n");
> return -EINVAL;
> }
>
I'm pretty sure that the condition here is wrong, not the error message.
AFAIK it doesn't make sense to configure FEC on ethernet/copper ports,
but for SFP ports, it may be required depending on the transceiver or
cable used, especially for fiber modules.
I may be wrong though.
This check was introduced with bb5dbf2cc64d ("net: marvell: prestera:
add firmware v4.0 support"), but that commit does not offer any
explanation for it in the commit message.
Best regards,
Jonas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
2026-02-02 10:26 ` Jonas Gorski
@ 2026-02-04 3:15 ` Jakub Kicinski
2026-02-04 13:13 ` [EXTERNAL] " Elad Nachman
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2026-02-04 3:15 UTC (permalink / raw)
To: Elad Nachman
Cc: Jonas Gorski, Alok Tiwari, tchornyi, vmytnyk, yevhen.orlov,
vkochan, taras.chornyi, pabeni, edumazet, davem, andrew+netdev,
netdev, alok.a.tiwarilinux
On Mon, 2 Feb 2026 11:26:00 +0100 Jonas Gorski wrote:
> On 02/02/2026 06:28, Alok Tiwari wrote:
> > In prestera_ethtool_set_fecparam(), the error message is opposite of
> > the condition checking PRESTERA_PORT_TCVR_SFP. FEC configuration is
> > not allowed on SFP ports, but the message says "non-SFP ports", which
> > does not match the condition.
> >
> > diff --git a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> > index 2f52daba58e6..a259da9f30f4 100644
> > --- a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> > +++ b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> > @@ -718,7 +718,7 @@ static int prestera_ethtool_set_fecparam(struct net_device *dev,
> > }
> >
> > if (port->caps.transceiver == PRESTERA_PORT_TCVR_SFP) {
> > - netdev_err(dev, "FEC set is not allowed on non-SFP ports\n");
> > + netdev_err(dev, "FEC set is not allowed on SFP ports\n");
> > return -EINVAL;
> > }
> >
>
> I'm pretty sure that the condition here is wrong, not the error message.
>
> AFAIK it doesn't make sense to configure FEC on ethernet/copper ports,
> but for SFP ports, it may be required depending on the transceiver or
> cable used, especially for fiber modules.
>
> I may be wrong though.
>
> This check was introduced with bb5dbf2cc64d ("net: marvell: prestera:
> add firmware v4.0 support"), but that commit does not offer any
> explanation for it in the commit message.
Elad, could you clarify this? A bit hard to tell whether CR is included
in "SFP" from glancing at the code.
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [EXTERNAL] Re: [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
2026-02-04 3:15 ` Jakub Kicinski
@ 2026-02-04 13:13 ` Elad Nachman
2026-02-05 2:27 ` Jakub Kicinski
0 siblings, 1 reply; 7+ messages in thread
From: Elad Nachman @ 2026-02-04 13:13 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Jonas Gorski, Alok Tiwari, Taras Chornyi [C],
Volodymyr Mytnyk [C], Yevhen Orlov, Vadym Kochan [C],
Taras Chornyi, pabeni@redhat.com, edumazet@google.com,
davem@davemloft.net, andrew+netdev@lunn.ch,
netdev@vger.kernel.org, alok.a.tiwarilinux@gmail.com
Hi,
>
>
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Wednesday, February 4, 2026 5:15 AM
> To: Elad Nachman <enachman@marvell.com>
> Cc: Jonas Gorski <jonas.gorski@gmail.com>; Alok Tiwari <alok.a.tiwari@oracle.com>; Taras Chornyi [C] <tchornyi@marvell.com>; Volodymyr Mytnyk [C] <vmytnyk@marvell.com>; Yevhen Orlov <yevhen.orlov@plvision.eu>; Vadym Kochan [C] <vkochan@marvell.com>; Taras Chornyi <taras.chornyi@plvision.eu>; pabeni@redhat.com; edumazet@google.com; davem@davemloft.net; andrew+netdev@lunn.ch; netdev@vger.kernel.org; alok.a.tiwarilinux@gmail.com
> Subject: [EXTERNAL] Re: [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
> On Mon, 2 Feb 2026 11:26:00 +0100 Jonas Gorski wrote:
>
> > On 02/02/2026 06:28, Alok Tiwari wrote:
> > > In prestera_ethtool_set_fecparam(), the error message is opposite of
> > > the condition checking PRESTERA_PORT_TCVR_SFP. FEC configuration is
> > > not allowed on SFP ports, but the message says "non-SFP ports", which
> > > does not match the condition.
> > >
> > > diff --git a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> > > index 2f52daba58e6..a259da9f30f4 100644
> > > --- a/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> > > +++ b/drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
> > > @@ -718,7 +718,7 @@ static int prestera_ethtool_set_fecparam(struct net_device *dev,
> > > }
> > >
> > > if (port->caps.transceiver == PRESTERA_PORT_TCVR_SFP) {
> > > - netdev_err(dev, "FEC set is not allowed on non-SFP ports\n");
> > > + netdev_err(dev, "FEC set is not allowed on SFP ports\n");
> > > return -EINVAL;
> > > }
> > >
> >
> > I'm pretty sure that the condition here is wrong, not the error message.
> >
> > AFAIK it doesn't make sense to configure FEC on ethernet/copper ports,
> > but for SFP ports, it may be required depending on the transceiver or
> > cable used, especially for fiber modules.
> >
> > I may be wrong though.
> >
> > This check was introduced with bb5dbf2cc64d ("net: marvell: prestera:
> > add firmware v4.0 support"), but that commit does not offer any
> > explanation for it in the commit message.
>
> Elad, could you clarify this? A bit hard to tell whether CR is included
> in "SFP" from glancing at the code.
Basically, the supported devices have FEC on 10G-BASE-KR and upwards (CR: from 40G-BASE-CR),
and for USXGMII SERDES, which drives multiple copper PHYs.
Judging based on all of the above,
I think it is best to remove this check (plus said error message) altogether and let the firmware return an error if the mode/speed/FEC combination is invalid.
FYI,
Elad.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [EXTERNAL] Re: [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
2026-02-04 13:13 ` [EXTERNAL] " Elad Nachman
@ 2026-02-05 2:27 ` Jakub Kicinski
2026-02-05 3:16 ` ALOK TIWARI
0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2026-02-05 2:27 UTC (permalink / raw)
To: Elad Nachman, Alok Tiwari
Cc: Jonas Gorski, Taras Chornyi [C], Volodymyr Mytnyk [C],
Yevhen Orlov, Vadym Kochan [C], Taras Chornyi, pabeni@redhat.com,
edumazet@google.com, davem@davemloft.net, andrew+netdev@lunn.ch,
netdev@vger.kernel.org, alok.a.tiwarilinux@gmail.com
On Wed, 4 Feb 2026 13:13:31 +0000 Elad Nachman wrote:
> > > I'm pretty sure that the condition here is wrong, not the error message.
> > >
> > > AFAIK it doesn't make sense to configure FEC on ethernet/copper ports,
> > > but for SFP ports, it may be required depending on the transceiver or
> > > cable used, especially for fiber modules.
> > >
> > > I may be wrong though.
> > >
> > > This check was introduced with bb5dbf2cc64d ("net: marvell: prestera:
> > > add firmware v4.0 support"), but that commit does not offer any
> > > explanation for it in the commit message.
> >
> > Elad, could you clarify this? A bit hard to tell whether CR is included
> > in "SFP" from glancing at the code.
>
> Basically, the supported devices have FEC on 10G-BASE-KR and upwards
> (CR: from 40G-BASE-CR), and for USXGMII SERDES, which drives multiple
> copper PHYs.
>
> Judging based on all of the above,
> I think it is best to remove this check (plus said error message)
> altogether and let the firmware return an error if the mode/speed/FEC
> combination is invalid.
SG, thanks for explaining
Alok, pls respin as suggested.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [EXTERNAL] Re: [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports
2026-02-05 2:27 ` Jakub Kicinski
@ 2026-02-05 3:16 ` ALOK TIWARI
0 siblings, 0 replies; 7+ messages in thread
From: ALOK TIWARI @ 2026-02-05 3:16 UTC (permalink / raw)
To: Jakub Kicinski, Elad Nachman
Cc: Jonas Gorski, Taras Chornyi [C], Volodymyr Mytnyk [C],
Yevhen Orlov, Vadym Kochan [C], Taras Chornyi, pabeni@redhat.com,
edumazet@google.com, davem@davemloft.net, andrew+netdev@lunn.ch,
netdev@vger.kernel.org, alok.a.tiwarilinux@gmail.com
On 2/5/2026 7:57 AM, Jakub Kicinski wrote:
> On Wed, 4 Feb 2026 13:13:31 +0000 Elad Nachman wrote:
>>>> I'm pretty sure that the condition here is wrong, not the error message.
>>>>
>>>> AFAIK it doesn't make sense to configure FEC on ethernet/copper ports,
>>>> but for SFP ports, it may be required depending on the transceiver or
>>>> cable used, especially for fiber modules.
>>>>
>>>> I may be wrong though.
>>>>
>>>> This check was introduced with bb5dbf2cc64d ("net: marvell: prestera:
>>>> add firmware v4.0 support"), but that commit does not offer any
>>>> explanation for it in the commit message.
>>>
>>> Elad, could you clarify this? A bit hard to tell whether CR is included
>>> in "SFP" from glancing at the code.
>>
>> Basically, the supported devices have FEC on 10G-BASE-KR and upwards
>> (CR: from 40G-BASE-CR), and for USXGMII SERDES, which drives multiple
>> copper PHYs.
>>
>> Judging based on all of the above,
>> I think it is best to remove this check (plus said error message)
>> altogether and let the firmware return an error if the mode/speed/FEC
>> combination is invalid.
>
> SG, thanks for explaining
>
> Alok, pls respin as suggested.
Thanks for the clarification.
I will send a v2 that removes the "port->caps.transceiver ==
PRESTERA_PORT_TCVR_SFP"
check and lets the firmware handle validation.
Thanks,
Alok
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-02-05 3:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 5:28 [PATCH net-next] net: marvell: prestera: fix FEC error message for SFP ports Alok Tiwari
2026-02-02 9:47 ` [EXTERNAL] " Elad Nachman
2026-02-02 10:26 ` Jonas Gorski
2026-02-04 3:15 ` Jakub Kicinski
2026-02-04 13:13 ` [EXTERNAL] " Elad Nachman
2026-02-05 2:27 ` Jakub Kicinski
2026-02-05 3:16 ` ALOK TIWARI
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox