From: Andrew Rybchenko Date: Tue, 10 Apr 2018 12:48:25 +0000 (+0100) Subject: net/sfc: use default FEC mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0b19aec12a5cc484ba35e310c275f34c86192220;p=dpdk.git 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 --- diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c index 5cc3ad7bd6..5384dbbdb8 100644 --- a/drivers/net/sfc/sfc_port.c +++ b/drivers/net/sfc/sfc_port.c @@ -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)