aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavdeep Parhar <np@FreeBSD.org>2021-11-11 00:10:41 +0000
committerNavdeep Parhar <np@FreeBSD.org>2022-02-28 06:45:20 +0000
commitf4592cd2a4b040cdc279bc53d0a5905c350e7090 (patch)
tree6afdb45712b4e1a0c50f3ea3f6ac8d4313102546
parent3db50d924d7bbfb12b2213ae1a3a2bf4cbbb9141 (diff)
downloadsrc-f4592cd2a4b040cdc279bc53d0a5905c350e7090.tar.gz
src-f4592cd2a4b040cdc279bc53d0a5905c350e7090.zip
cxgbe(4): Keep link configuration compatible with really old firmwares.
Sponsored by: Chelsio Communications (cherry picked from commit 8e76bae0b72e53da80c48ba138b1cfd712724df4)
-rw-r--r--sys/dev/cxgbe/common/t4_hw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c
index d6f85a1fcd34..e2b55dc71eba 100644
--- a/sys/dev/cxgbe/common/t4_hw.c
+++ b/sys/dev/cxgbe/common/t4_hw.c
@@ -3959,6 +3959,14 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
if (lc->requested_fec & FEC_MODULE)
fec |= fec_to_fwcap(lc->fec_hint);
}
+
+ /*
+ * This is for compatibility with old firmwares. The original
+ * way to request NO_FEC was to not set any of the FEC bits. New
+ * firmwares understand this too.
+ */
+ if (fec == FW_PORT_CAP32_FEC_NO_FEC)
+ fec = 0;
}
/* Force AN on for BT cards. */