From nobody Tue Jan 09 21:51:31 2024 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 4T8l4g4XLkz56WxD; Tue, 9 Jan 2024 21:51:31 +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 4T8l4g40HDz49WC; Tue, 9 Jan 2024 21:51:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704837091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIwwXqMi1IpUPUMlkJvavTblHBUXgXtqjkCiP+ns+io=; b=shy781xjXd8RbRMNe7tqFhRH2ikTMjVk27oQhWjCYN4aoPBkqk7F144Jnt07uSUKAtFLRm fNTwn/6bCbj24EHcdSjjZKIvII/ZKGXUzPLoydklkR+FAuNyiG7KAnfNEhKWrHpet9wJtF BY6ModCj79iPWKX1nn+Lvwf4Kc4V3LqBbN62Ywn5ohHIybI7K90Rq0LYYfsbPPEe25Qesm rbtqgnkS6LrPbfpemOs44u58XqEe51z8F0NPl5FtqN3FOGRU7Q0TOb1rc/0jgcSyyLUysT 9ZLCVTBSzHMe/VTO+AgTfNfg1EXiNl61P1GfI2BAtOFiakK7NlRDVWoJtZEX2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704837091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIwwXqMi1IpUPUMlkJvavTblHBUXgXtqjkCiP+ns+io=; b=DsOAeMHkJw++dURgCgVIkO3vgVZKaKzxMMrck7ZXVNkrYdxX9BAh0Zqg9pSrh7tqDvIiF7 86CvvEd1HM2f1SaOjOHUfr4z+UhGXd+RkyltSn8deicP7+6hzD+6t8OWmzrrn3thqkBGFK pBJGR69LzqaY4TQyN3E+UIXqw/GLbSk+OleuPtVId4XDZ7T4CVEr7QSsM8E2KoYIY36a1+ bIZUMF8oHAz8YJ9Lv3/cV2GtdlRvu0gdJAk4waBCKWmopgMQhOIMXIKkjHGeeWZRLW7c29 snVuzXjHEXPGTh0mKWMnlQoXaU/dgYvqtnJc45sz4bycETOKEq8Ef8MvBd7JZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704837091; a=rsa-sha256; cv=none; b=JPcITQ6Srgfejg4s/80XEETpeLwGfrH820u1I0/8yOfSTuM0GCkws2X9H2H56M5+cSOJ5H cWsk5OERcLIdEd7Btkxxy0NQZFuhwVYfbTqSiggOISKIrKuhwWtayZuJySavLuLKwTM43T 52ye0mSD+jmfewEOSFSef6TzIYorpbTT6fCkzHmCRRxOFow05nxq0klivucVdvLbcxwZxZ NBW7AX8JncpKoPek6sP0Bjk7CjnHK9OycWpsH4PjMbYYVXerZqZyU66TscL5p0dXBjfQVs eQwQov0eZ10yEDTNXby1H+XKbZgIrcDfPYnKLQ+MbAgvPmZeSKPc/tcczKZnfQ== 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 4T8l4g33Txz17Lr; Tue, 9 Jan 2024 21:51:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 409LpVMg078296; Tue, 9 Jan 2024 21:51:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 409LpVss078293; Tue, 9 Jan 2024 21:51:31 GMT (envelope-from git) Date: Tue, 9 Jan 2024 21:51:31 GMT Message-Id: <202401092151.409LpVss078293@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: 9ea86c8f67a6 - main - cxgbe(4): Use the correct size for the CIM LA on the T6. 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: 9ea86c8f67a65ca00f79f3cd83aa977b38589f39 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=9ea86c8f67a65ca00f79f3cd83aa977b38589f39 commit 9ea86c8f67a65ca00f79f3cd83aa977b38589f39 Author: Navdeep Parhar AuthorDate: 2024-01-09 21:22:16 +0000 Commit: Navdeep Parhar CommitDate: 2024-01-09 21:27:00 +0000 cxgbe(4): Use the correct size for the CIM LA on the T6. The logic analyzer in the T6 CIM block has a different capture size than previous chips. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/common.h | 1 + sys/dev/cxgbe/common/t4_hw.c | 7 +++++-- sys/dev/cxgbe/common/t4_hw.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index cd1e648f8e59..0861e3df4bee 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -313,6 +313,7 @@ struct chip_params { u32 sge_fl_db; u16 mps_tcam_size; u16 rss_nentries; + u16 cim_la_size; }; /* VF-only parameters. */ diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 41063d5c7d76..c18243e4b681 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9303,6 +9303,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO, .mps_tcam_size = NUM_MPS_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T5 */ @@ -9317,6 +9318,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = F_DBPRIO | F_DBTYPE, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE, }, { /* T6 */ @@ -9331,6 +9333,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .sge_fl_db = 0, .mps_tcam_size = NUM_MPS_T5_CLS_SRAM_L_INSTANCES, .rss_nentries = T6_RSS_NENTRIES, + .cim_la_size = CIMLA_SIZE_T6, }, }; @@ -9386,11 +9389,11 @@ int t4_prep_adapter(struct adapter *adapter, u32 *buf) /* Cards with real ASICs have the chipid in the PCIe device id */ t4_os_pci_read_cfg2(adapter, PCI_DEVICE_ID, &device_id); if (device_id >> 12 == chip_id(adapter)) - adapter->params.cim_la_size = CIMLA_SIZE; + adapter->params.cim_la_size = adapter->chip_params->cim_la_size; else { /* FPGA */ adapter->params.fpga = 1; - adapter->params.cim_la_size = 2 * CIMLA_SIZE; + adapter->params.cim_la_size = 2 * adapter->chip_params->cim_la_size; } ret = get_vpd_params(adapter, &adapter->params.vpd, device_id, buf); diff --git a/sys/dev/cxgbe/common/t4_hw.h b/sys/dev/cxgbe/common/t4_hw.h index e943acb8dec9..79ec690cd5e6 100644 --- a/sys/dev/cxgbe/common/t4_hw.h +++ b/sys/dev/cxgbe/common/t4_hw.h @@ -66,7 +66,8 @@ enum { CIM_NUM_IBQ = 6, /* # of CIM IBQs */ CIM_NUM_OBQ = 6, /* # of CIM OBQs */ CIM_NUM_OBQ_T5 = 8, /* # of CIM OBQs for T5 adapter */ - CIMLA_SIZE = 2048, /* # of 32-bit words in CIM LA */ + CIMLA_SIZE = 256 * 8, /* 256 rows * ceil(235/32) 32-bit words */ + CIMLA_SIZE_T6 = 256 * 10, /* 256 rows * ceil(311/32) 32-bit words */ CIM_PIFLA_SIZE = 64, /* # of 192-bit words in CIM PIF LA */ CIM_MALA_SIZE = 64, /* # of 160-bit words in CIM MA LA */ CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */