net: marvell: prestera: fix FEC error message for SFP ports
Subsystems (3)
PATCH v2 1/1 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. However, FEC may be required depending on the transceiver, cable, or mode, and firmware already validates invalid combinations.
Remove the SFP transceiver check and let firmware handle validation.
---
v1 -> v2
remove condition of if (port->caps.transceiver == PRESTERA_PORT_TCVR_SFP) check instead of error message correction
--- drivers/net/ethernet/marvell/prestera/prestera_ethtool.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/net/ethernet/marvell/prestera/prestera_ethtool.c +0 -5
@@ -717,11 +717,6 @@ static int prestera_ethtool_set_fecparam(struct net_device *dev,return -EINVAL ; } -if (port->caps.transceiver ==PRESTERA_PORT_TCVR_SFP ) { -netdev_err (dev,"FEC set is not allowed on non-SFP ports\n" ); -return -EINVAL ; - } - fec =PRESTERA_PORT_FEC_MAX ;for (mode =0 ; mode <PRESTERA_PORT_FEC_MAX ; mode++) { if ((port_fec_caps[mode].eth_fec & fecparam->fec) &&
Signature · 1 line
2.50.1
Quoted 43 lines
From: Alok Tiwari <[email protected]>
Sent: Thursday, February 5, 2026 11:20 AM
To: Elad Nachman <[email protected]>; Taras Chornyi [C] <[email protected]>; Volodymyr Mytnyk [C] <[email protected]>; Vadym Kochan [C] <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: [EXTERNAL] [PATCH v2 net-next] net: marvell: prestera: fix FEC error message for SFP portsIn
prestera_ethtool_set_fecparam(), the error message is opposite of the condition checkingPRESTERA_PORT_TCVR_SFP. FEC configuration is not allowed on SFP ports, but the message says "non-SFP ports", which does not match the condition. However, FEC may be required depending on the transceiver, cable, or mode, and firmware already validates invalid combinations.Remove the SFP transceiver check and let firmware handle validation.
Signed-off-by Alok Tiwari <mailto:[email protected]>---
v1 -> v2
remove condition of if (port->caps.transceiver==PRESTERA_PORT_TCVR_SFP) check instead of error message correction--- drivers/net/ethernet/marvell/prestera/prestera_ethtool.c | 5 ----- 1 file changed, 5 deletions(-)drivers/net/ethernet/marvell/prestera/prestera_ethtool.c +0
-6@@ -717,11 +717,6 @@ static int prestera_ethtool_set_fecparam(struct net_device *dev,return -EINVAL ; } -if (port->caps.transceiver ==PRESTERA_PORT_TCVR_SFP ) { -netdev_err (dev,"FEC set is not allowed on non-SFP ports\n" ); -return -EINVAL ; - } - fec =PRESTERA_PORT_FEC_MAX ;for (mode =0 ; mode <PRESTERA_PORT_FEC_MAX ; mode++) { if ((port_fec_caps[mode].eth_fec & fecparam->fec) && --
Quoted 2 lines
2.50.1
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 5 Feb 2026 01:19:55 -0800 you wrote:
In
prestera_ethtool_set_fecparam(), the error message is opposite of the condition checkingPRESTERA_PORT_TCVR_SFP. FEC configuration is not allowed on SFP ports, but the message says "non-SFP ports", which does not match the condition. However, FEC may be required depending on the transceiver, cable, or mode, and firmware already validates invalid combinations.[...]
Here is the summary with links:
- [v2,net-next] net: marvell: prestera: fix FEC error message for SFP ports
https://git.kernel.org/netdev/net-next/c/dddb0198c2a8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html