net/sfc: use default FEC mode

All FEC modes are supported and allowed, but none are explicitly
requested.

This effectively means that FEC mode is determined solely form cable
requirements and link partner capabilities / requirements.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Andrew Rybchenko 2018-04-10 13:48:25 +01:00 committed by Ferruh Yigit
parent 9ef8ebe790
commit 0b19aec12a

View File

@ -192,6 +192,16 @@ sfc_port_start(struct sfc_adapter *sa)
SFC_ASSERT((port->phy_adv_cap & phy_pause_caps) == 0);
phy_adv_cap = port->phy_adv_cap | (phy_adv_cap & phy_pause_caps);
/*
* No controls for FEC yet. Use default FEC mode.
* I.e. advertise everything supported (*_FEC=1), but do not request
* anything explicitly (*_FEC_REQUESTED=0).
*/
phy_adv_cap |= port->phy_adv_cap_mask &
(1u << EFX_PHY_CAP_BASER_FEC |
1u << EFX_PHY_CAP_RS_FEC |
1u << EFX_PHY_CAP_25G_BASER_FEC);
sfc_log_init(sa, "set phy adv caps to %#x", phy_adv_cap);
rc = efx_phy_adv_cap_set(sa->nic, phy_adv_cap);
if (rc != 0)