git: d0ff9b029c71 - main - cxgbe(4): Fix regression in previous attempt to fix FEC selection.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 10 Jan 2022 22:06:31 UTC
The branch main has been updated by np:
URL: https://cgit.FreeBSD.org/src/commit/?id=d0ff9b029c7175e20c801126be127db7c651b02e
commit d0ff9b029c7175e20c801126be127db7c651b02e
Author: Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2022-01-10 21:54:06 +0000
Commit: Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2022-01-10 22:04:56 +0000
cxgbe(4): Fix regression in previous attempt to fix FEC selection.
Fixes: f3c2987f2f5c91f0801fa8bbf9e1bc09d91aeb46
MFC after: 3 days
Sponsored by: Chelsio Communications
---
sys/dev/cxgbe/common/t4_hw.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c
index b99d67bca49b..c7e4d48e855f 100644
--- a/sys/dev/cxgbe/common/t4_hw.c
+++ b/sys/dev/cxgbe/common/t4_hw.c
@@ -3947,12 +3947,13 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
* the potential top speed. Request the best
* FEC at that speed instead.
*/
- if (speed & FW_PORT_CAP32_SPEED_100G &&
- fec == FW_PORT_CAP32_FEC_BASER_RS)
- fec = FW_PORT_CAP32_FEC_RS;
- else if (speed & FW_PORT_CAP32_SPEED_50G &&
- fec == FW_PORT_CAP32_FEC_RS)
- fec = FW_PORT_CAP32_FEC_BASER_RS;
+ if (speed & FW_PORT_CAP32_SPEED_100G) {
+ if (fec == FW_PORT_CAP32_FEC_BASER_RS)
+ fec = FW_PORT_CAP32_FEC_RS;
+ } else if (speed & FW_PORT_CAP32_SPEED_50G) {
+ if (fec == FW_PORT_CAP32_FEC_RS)
+ fec = FW_PORT_CAP32_FEC_BASER_RS;
+ }
}
} else {
/*