Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Acked-by: Elad Nachman <enachman@marvell.com>
Link: https://patch.msgid.link/20260205091958.231413-1-alok.a.tiwari@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Alok Tiwari and committed by
Jakub Kicinski
dddb0198 2214aab2

-5
-5
drivers/net/ethernet/marvell/prestera/prestera_ethtool.c
··· 717 717 return -EINVAL; 718 718 } 719 719 720 - if (port->caps.transceiver == PRESTERA_PORT_TCVR_SFP) { 721 - netdev_err(dev, "FEC set is not allowed on non-SFP ports\n"); 722 - return -EINVAL; 723 - } 724 - 725 720 fec = PRESTERA_PORT_FEC_MAX; 726 721 for (mode = 0; mode < PRESTERA_PORT_FEC_MAX; mode++) { 727 722 if ((port_fec_caps[mode].eth_fec & fecparam->fec) &&