From owner-dev-commits-src-branches@freebsd.org Mon Apr 26 19:03:56 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 396F45EC8BB; Mon, 26 Apr 2021 19:03:56 +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 4FTZ7H661Mz4Sw1; Mon, 26 Apr 2021 19:03:55 +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 45F594E83; Mon, 26 Apr 2021 19:03:55 +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 13QJ3tqn080215; Mon, 26 Apr 2021 19:03:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13QJ3t6D080214; Mon, 26 Apr 2021 19:03:55 GMT (envelope-from git) Date: Mon, 26 Apr 2021 19:03:55 GMT Message-Id: <202104261903.13QJ3t6D080214@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: 345bf0b368fb - stable/13 - cxgbei: Pass ULP submode directly to set_ulp_mode_iscsi(). 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: 345bf0b368fbb89b74467f711d4004dec7c5c597 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2021 19:03:56 -0000 The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=345bf0b368fbb89b74467f711d4004dec7c5c597 commit 345bf0b368fbb89b74467f711d4004dec7c5c597 Author: John Baldwin AuthorDate: 2021-03-22 16:59:02 +0000 Commit: John Baldwin CommitDate: 2021-04-26 19:01:52 +0000 cxgbei: Pass ULP submode directly to set_ulp_mode_iscsi(). Sponsored by: Chelsio Communications (cherry picked from commit 8855ed61b5b7de94744fc415e5f049fee342d6b5) --- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 6b25568e112b..72626e60b58e 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -575,18 +575,14 @@ send_iscsi_flowc_wr(struct adapter *sc, struct toepcb *toep, int maxlen) } static void -set_ulp_mode_iscsi(struct adapter *sc, struct toepcb *toep, int hcrc, int dcrc) +set_ulp_mode_iscsi(struct adapter *sc, struct toepcb *toep, u_int ulp_submode) { - uint64_t val = ULP_MODE_ISCSI; + uint64_t val; - if (hcrc) - val |= ULP_CRC_HEADER << 4; - if (dcrc) - val |= ULP_CRC_DATA << 4; - - CTR4(KTR_CXGBE, "%s: tid %u, ULP_MODE_ISCSI, CRC hdr=%d data=%d", - __func__, toep->tid, hcrc, dcrc); + CTR3(KTR_CXGBE, "%s: tid %u, ULP_MODE_ISCSI, submode=%#x", + __func__, toep->tid, ulp_submode); + val = V_TCB_ULP_TYPE(ULP_MODE_ISCSI) | V_TCB_ULP_RAW(ulp_submode); t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_ULP_TYPE, V_TCB_ULP_TYPE(M_TCB_ULP_TYPE) | V_TCB_ULP_RAW(M_TCB_ULP_RAW), val, 0, 0); @@ -698,8 +694,7 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) toep->ulpcb = icc; send_iscsi_flowc_wr(icc->sc, toep, ci->max_tx_pdu_len); - set_ulp_mode_iscsi(icc->sc, toep, ic->ic_header_crc32c, - ic->ic_data_crc32c); + set_ulp_mode_iscsi(icc->sc, toep, icc->ulp_submode); error = 0; } INP_WUNLOCK(inp);