DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/sfc: use default FEC mode
@ 2018-04-10 12:48 Andrew Rybchenko
  2018-04-12 18:05 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Rybchenko @ 2018-04-10 12:48 UTC (permalink / raw)
  To: dev

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>
---
 drivers/net/sfc/sfc_port.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index fd267e1..1391841 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -155,6 +155,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)
-- 
2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/sfc: use default FEC mode
  2018-04-10 12:48 [dpdk-dev] [PATCH] net/sfc: use default FEC mode Andrew Rybchenko
@ 2018-04-12 18:05 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2018-04-12 18:05 UTC (permalink / raw)
  To: Andrew Rybchenko, dev

On 4/10/2018 1:48 PM, Andrew Rybchenko wrote:
> 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>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-12 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10 12:48 [dpdk-dev] [PATCH] net/sfc: use default FEC mode Andrew Rybchenko
2018-04-12 18:05 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).