From nobody Fri Oct 29 23:58:41 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 C73F5181DC6F; Fri, 29 Oct 2021 23:58:48 +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 4Hgzsh0BT0z4VcX; Fri, 29 Oct 2021 23:58:48 +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 9D9C91FFDA; Fri, 29 Oct 2021 23:58:41 +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 19TNwfV1004104; Fri, 29 Oct 2021 23:58:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19TNwfNY004103; Fri, 29 Oct 2021 23:58:41 GMT (envelope-from git) Date: Fri, 29 Oct 2021 23:58:41 GMT Message-Id: <202110292358.19TNwfNY004103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 56bc3b1a95bb - stable/13 - cxgbei: Disable ISO for -SO cards without external memory. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 56bc3b1a95bb54ea1653c483d77871f5334637b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=56bc3b1a95bb54ea1653c483d77871f5334637b0 commit 56bc3b1a95bb54ea1653c483d77871f5334637b0 Author: John Baldwin AuthorDate: 2021-09-13 16:57:54 +0000 Commit: John Baldwin CommitDate: 2021-10-29 23:35:15 +0000 cxgbei: Disable ISO for -SO cards without external memory. Reported by: Jithesh Arakkan @ Chelsio Sponsored by: Chelsio Communications (cherry picked from commit 9b1bb0aee697352b39b3efa1843f581ca29068ba) --- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 687fc545cebd..4b1eb0718e86 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$"); #include #include "common/common.h" +#include "common/t4_regs.h" #include "common/t4_tcb.h" #include "tom/t4_tom.h" #include "cxgbei.h" @@ -707,6 +708,19 @@ find_offload_adapter(struct adapter *sc, void *arg) INP_WUNLOCK(inp); } +static bool +is_memfree(struct adapter *sc) +{ + uint32_t em; + + em = t4_read_reg(sc, A_MA_TARGET_MEM_ENABLE); + if ((em & F_EXT_MEM_ENABLE) != 0) + return (false); + if (is_t5(sc) && (em & F_EXT_MEM1_ENABLE) != 0) + return (false); + return (true); +} + /* XXXNP: move this to t4_tom. */ static void send_iscsi_flowc_wr(struct adapter *sc, struct toepcb *toep, int maxlen) @@ -863,7 +877,8 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) if (ic->ic_data_crc32c) icc->ulp_submode |= ULP_CRC_DATA; - if (icc->sc->tt.iso && chip_id(icc->sc) >= CHELSIO_T5) { + if (icc->sc->tt.iso && chip_id(icc->sc) >= CHELSIO_T5 && + !is_memfree(icc->sc)) { max_iso_pdus = CXGBEI_MAX_ISO_PAYLOAD / max_tx_pdu_len; ic->ic_hw_isomax = max_iso_pdus *