git: 8855ed61b5b7 - main - cxgbei: Pass ULP submode directly to set_ulp_mode_iscsi().

John Baldwin jhb at FreeBSD.org
Mon Mar 22 17:05:18 UTC 2021


The branch main has been updated by jhb:

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

commit 8855ed61b5b7de94744fc415e5f049fee342d6b5
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-03-22 16:59:02 +0000
Commit:     John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-03-22 17:05:02 +0000

    cxgbei: Pass ULP submode directly to set_ulp_mode_iscsi().
    
    Reviewed by:    np
    MFC after:      2 weeks
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D29300
---
 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);


More information about the dev-commits-src-main mailing list