From nobody Mon Nov 15 18:19:01 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CE0991894643; Mon, 15 Nov 2021 18:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HtHWn5Rtdz3l00; Mon, 15 Nov 2021 18:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C9911E8AA; Mon, 15 Nov 2021 18:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AFIJ1oJ041123; Mon, 15 Nov 2021 18:19:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AFIJ1AE041122; Mon, 15 Nov 2021 18:19:01 GMT (envelope-from git) Date: Mon, 15 Nov 2021 18:19:01 GMT Message-Id: <202111151819.1AFIJ1AE041122@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 8e76bae0b72e - main - cxgbe(4): Keep link configuration compatible with really old firmwares. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e76bae0b72e53da80c48ba138b1cfd712724df4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=8e76bae0b72e53da80c48ba138b1cfd712724df4 commit 8e76bae0b72e53da80c48ba138b1cfd712724df4 Author: Navdeep Parhar AuthorDate: 2021-11-11 00:10:41 +0000 Commit: Navdeep Parhar CommitDate: 2021-11-15 18:18:04 +0000 cxgbe(4): Keep link configuration compatible with really old firmwares. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/t4_hw.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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. */