Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2022 06:55:50 GMT
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c50239ee3048 - stable/13 - cxgbe(4): Fix regression in previous attempt to fix FEC selection.
Message-ID:  <202202280655.21S6tob5077938@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=c50239ee304800de0aca21605aa4ed2a6225ee28

commit c50239ee304800de0aca21605aa4ed2a6225ee28
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2022-01-10 21:54:06 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2022-02-28 06:50:29 +0000

    cxgbe(4): Fix regression in previous attempt to fix FEC selection.
    
    Sponsored by:   Chelsio Communications
    
    (cherry picked from commit d0ff9b029c7175e20c801126be127db7c651b02e)
---
 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 c60594596959..6191cf5533cd 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 {
 			/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202280655.21S6tob5077938>