Commit dddb0198 authored by Alok Tiwari's avatar Alok Tiwari Committed by Jakub Kicinski
Browse files

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: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Acked-by: default avatarElad Nachman <enachman@marvell.com>
Link: https://patch.msgid.link/20260205091958.231413-1-alok.a.tiwari@oracle.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2214aab2
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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) &&