Blame SOURCES/0040-netdrv-bnxt_en-Update-firmware-interface-spec.-to-1..patch

f95c89
From bb970cfdc4d465839a47e12e5979d51b6895e412 Mon Sep 17 00:00:00 2001
f95c89
From: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Date: Wed, 2 Oct 2019 18:22:55 -0400
f95c89
Subject: [PATCH 40/96] [netdrv] bnxt_en: Update firmware interface spec. to
f95c89
 1.10.0.89
f95c89
f95c89
Message-id: <f765fa53dd82d1e7c2bea8482f560f6b05686463.1570027456.git.jtoppins@redhat.com>
f95c89
Patchwork-id: 276458
f95c89
O-Subject: [RHEL-8.2 PATCH 33/78] bnxt_en: Update firmware interface spec. to 1.10.0.89.
f95c89
Bugzilla: 1724766
f95c89
RH-Acked-by: John Linville <linville@redhat.com>
f95c89
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
f95c89
f95c89
Among the changes are new CoS discard counters and new ctx_hw_stats_ext
f95c89
struct for the latest 5750X B0 chips.
f95c89
f95c89
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
f95c89
Signed-off-by: David S. Miller <davem@davemloft.net>
f95c89
(cherry picked from commit 2792b5b95ed5f38279da08f467a490687332324d)
f95c89
Bugzilla: 1724766
f95c89
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23809532
f95c89
Tested: build, boot, basic ping
f95c89
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
f95c89
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
f95c89
---
f95c89
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  15 +++
f95c89
 drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h     | 109 ++++++++++++++++++----
f95c89
 2 files changed, 108 insertions(+), 16 deletions(-)
f95c89
f95c89
Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
f95c89
===================================================================
f95c89
--- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c	2020-02-06 16:23:15.223517622 +0100
f95c89
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c	2020-02-06 16:23:15.727512996 +0100
f95c89
@@ -207,6 +207,20 @@
f95c89
 	BNXT_TX_STATS_EXT_COS_ENTRY(6),				\
f95c89
 	BNXT_TX_STATS_EXT_COS_ENTRY(7)				\
f95c89
 
f95c89
+#define BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(n)			\
f95c89
+	BNXT_RX_STATS_EXT_ENTRY(rx_discard_bytes_cos##n),	\
f95c89
+	BNXT_RX_STATS_EXT_ENTRY(rx_discard_packets_cos##n)
f95c89
+
f95c89
+#define BNXT_RX_STATS_EXT_DISCARD_COS_ENTRIES				\
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(0),				\
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(1),				\
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(2),				\
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(3),				\
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(4),				\
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(5),				\
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(6),				\
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRY(7)
f95c89
+
f95c89
 #define BNXT_RX_STATS_PRI_ENTRY(counter, n)		\
f95c89
 	{ BNXT_RX_STATS_EXT_OFFSET(counter##_cos0),	\
f95c89
 	  __stringify(counter##_pri##n) }
f95c89
@@ -352,6 +366,7 @@
f95c89
 	BNXT_RX_STATS_EXT_ENTRY(rx_buffer_passed_threshold),
f95c89
 	BNXT_RX_STATS_EXT_ENTRY(rx_pcs_symbol_err),
f95c89
 	BNXT_RX_STATS_EXT_ENTRY(rx_corrected_bits),
f95c89
+	BNXT_RX_STATS_EXT_DISCARD_COS_ENTRIES,
f95c89
 };
f95c89
 
f95c89
 static const struct {
f95c89
Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h
f95c89
===================================================================
f95c89
--- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h	2020-02-06 16:23:12.696540818 +0100
f95c89
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h	2020-02-06 16:23:15.728512987 +0100
f95c89
@@ -1,7 +1,8 @@
f95c89
 /* Broadcom NetXtreme-C/E network driver.
f95c89
  *
f95c89
  * Copyright (c) 2014-2016 Broadcom Corporation
f95c89
- * Copyright (c) 2016-2019 Broadcom Limited
f95c89
+ * Copyright (c) 2014-2018 Broadcom Limited
f95c89
+ * Copyright (c) 2018-2019 Broadcom Inc.
f95c89
  *
f95c89
  * This program is free software; you can redistribute it and/or modify
f95c89
  * it under the terms of the GNU General Public License as published by
f95c89
@@ -39,15 +40,15 @@
f95c89
 #define TLV_TYPE_ROCE_SP_COMMAND                 0x3UL
f95c89
 #define TLV_TYPE_QUERY_ROCE_CC_GEN1              0x4UL
f95c89
 #define TLV_TYPE_MODIFY_ROCE_CC_GEN1             0x5UL
f95c89
-#define TLV_TYPE_ENGINE_CKV_DEVICE_SERIAL_NUMBER 0x8001UL
f95c89
-#define TLV_TYPE_ENGINE_CKV_NONCE                0x8002UL
f95c89
+#define TLV_TYPE_ENGINE_CKV_ALIAS_ECC_PUBLIC_KEY 0x8001UL
f95c89
 #define TLV_TYPE_ENGINE_CKV_IV                   0x8003UL
f95c89
 #define TLV_TYPE_ENGINE_CKV_AUTH_TAG             0x8004UL
f95c89
 #define TLV_TYPE_ENGINE_CKV_CIPHERTEXT           0x8005UL
f95c89
 #define TLV_TYPE_ENGINE_CKV_ALGORITHMS           0x8006UL
f95c89
-#define TLV_TYPE_ENGINE_CKV_ECC_PUBLIC_KEY       0x8007UL
f95c89
+#define TLV_TYPE_ENGINE_CKV_HOST_ECC_PUBLIC_KEY  0x8007UL
f95c89
 #define TLV_TYPE_ENGINE_CKV_ECDSA_SIGNATURE      0x8008UL
f95c89
-#define TLV_TYPE_LAST                           TLV_TYPE_ENGINE_CKV_ECDSA_SIGNATURE
f95c89
+#define TLV_TYPE_ENGINE_CKV_SRT_ECC_PUBLIC_KEY   0x8009UL
f95c89
+#define TLV_TYPE_LAST                           TLV_TYPE_ENGINE_CKV_SRT_ECC_PUBLIC_KEY
f95c89
 
f95c89
 
f95c89
 /* tlv (size:64b/8B) */
f95c89
@@ -267,7 +268,6 @@
f95c89
 	#define HWRM_CFA_EEM_OP                           0x123UL
f95c89
 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS              0x124UL
f95c89
 	#define HWRM_CFA_TFLIB                            0x125UL
f95c89
-	#define HWRM_ENGINE_CKV_HELLO                     0x12dUL
f95c89
 	#define HWRM_ENGINE_CKV_STATUS                    0x12eUL
f95c89
 	#define HWRM_ENGINE_CKV_CKEK_ADD                  0x12fUL
f95c89
 	#define HWRM_ENGINE_CKV_CKEK_DELETE               0x130UL
f95c89
@@ -313,6 +313,7 @@
f95c89
 	#define HWRM_FUNC_BACKING_STORE_QCFG              0x194UL
f95c89
 	#define HWRM_FUNC_VF_BW_CFG                       0x195UL
f95c89
 	#define HWRM_FUNC_VF_BW_QCFG                      0x196UL
f95c89
+	#define HWRM_FUNC_HOST_PF_IDS_QUERY               0x197UL
f95c89
 	#define HWRM_SELFTEST_QLIST                       0x200UL
f95c89
 	#define HWRM_SELFTEST_EXEC                        0x201UL
f95c89
 	#define HWRM_SELFTEST_IRQ                         0x202UL
f95c89
@@ -410,8 +411,8 @@
f95c89
 #define HWRM_VERSION_MAJOR 1
f95c89
 #define HWRM_VERSION_MINOR 10
f95c89
 #define HWRM_VERSION_UPDATE 0
f95c89
-#define HWRM_VERSION_RSVD 69
f95c89
-#define HWRM_VERSION_STR "1.10.0.69"
f95c89
+#define HWRM_VERSION_RSVD 89
f95c89
+#define HWRM_VERSION_STR "1.10.0.89"
f95c89
 
f95c89
 /* hwrm_ver_get_input (size:192b/24B) */
f95c89
 struct hwrm_ver_get_input {
f95c89
@@ -624,6 +625,8 @@
f95c89
 	#define ASYNC_EVENT_CMPL_EVENT_ID_TCP_FLAG_ACTION_CHANGE     0x3aUL
f95c89
 	#define ASYNC_EVENT_CMPL_EVENT_ID_EEM_FLOW_ACTIVE            0x3bUL
f95c89
 	#define ASYNC_EVENT_CMPL_EVENT_ID_EEM_CFG_CHANGE             0x3cUL
f95c89
+	#define ASYNC_EVENT_CMPL_EVENT_ID_TFLIB_DEFAULT_VNIC_CHANGE  0x3dUL
f95c89
+	#define ASYNC_EVENT_CMPL_EVENT_ID_TFLIB_LINK_STATUS_CHANGE   0x3eUL
f95c89
 	#define ASYNC_EVENT_CMPL_EVENT_ID_FW_TRACE_MSG               0xfeUL
f95c89
 	#define ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR                 0xffUL
f95c89
 	#define ASYNC_EVENT_CMPL_EVENT_ID_LAST                      ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR
f95c89
@@ -1122,6 +1125,7 @@
f95c89
 	#define FUNC_QCFG_RESP_FLAGS_MULTI_HOST                   0x20UL
f95c89
 	#define FUNC_QCFG_RESP_FLAGS_TRUSTED_VF                   0x40UL
f95c89
 	#define FUNC_QCFG_RESP_FLAGS_SECURE_MODE_ENABLED          0x80UL
f95c89
+	#define FUNC_QCFG_RESP_FLAGS_PREBOOT_LEGACY_L2_RINGS      0x100UL
f95c89
 	u8	mac_address[6];
f95c89
 	__le16	pci_id;
f95c89
 	__le16	alloc_rsscos_ctx;
f95c89
@@ -1241,6 +1245,7 @@
f95c89
 	#define FUNC_CFG_REQ_FLAGS_DYNAMIC_TX_RING_ALLOC          0x400000UL
f95c89
 	#define FUNC_CFG_REQ_FLAGS_NQ_ASSETS_TEST                 0x800000UL
f95c89
 	#define FUNC_CFG_REQ_FLAGS_TRUSTED_VF_DISABLE             0x1000000UL
f95c89
+	#define FUNC_CFG_REQ_FLAGS_PREBOOT_LEGACY_L2_RINGS        0x2000000UL
f95c89
 	__le32	enables;
f95c89
 	#define FUNC_CFG_REQ_ENABLES_MTU                     0x1UL
f95c89
 	#define FUNC_CFG_REQ_ENABLES_MRU                     0x2UL
f95c89
@@ -2916,7 +2921,7 @@
f95c89
 	__le64	pfc_pri7_tx_transitions;
f95c89
 };
f95c89
 
f95c89
-/* rx_port_stats_ext (size:2624b/328B) */
f95c89
+/* rx_port_stats_ext (size:3648b/456B) */
f95c89
 struct rx_port_stats_ext {
f95c89
 	__le64	link_down_events;
f95c89
 	__le64	continuous_pause_events;
f95c89
@@ -2959,6 +2964,22 @@
f95c89
 	__le64	rx_buffer_passed_threshold;
f95c89
 	__le64	rx_pcs_symbol_err;
f95c89
 	__le64	rx_corrected_bits;
f95c89
+	__le64	rx_discard_bytes_cos0;
f95c89
+	__le64	rx_discard_bytes_cos1;
f95c89
+	__le64	rx_discard_bytes_cos2;
f95c89
+	__le64	rx_discard_bytes_cos3;
f95c89
+	__le64	rx_discard_bytes_cos4;
f95c89
+	__le64	rx_discard_bytes_cos5;
f95c89
+	__le64	rx_discard_bytes_cos6;
f95c89
+	__le64	rx_discard_bytes_cos7;
f95c89
+	__le64	rx_discard_packets_cos0;
f95c89
+	__le64	rx_discard_packets_cos1;
f95c89
+	__le64	rx_discard_packets_cos2;
f95c89
+	__le64	rx_discard_packets_cos3;
f95c89
+	__le64	rx_discard_packets_cos4;
f95c89
+	__le64	rx_discard_packets_cos5;
f95c89
+	__le64	rx_discard_packets_cos6;
f95c89
+	__le64	rx_discard_packets_cos7;
f95c89
 };
f95c89
 
f95c89
 /* hwrm_port_qstats_ext_input (size:320b/40B) */
f95c89
@@ -6115,6 +6136,21 @@
f95c89
 	u8	valid;
f95c89
 };
f95c89
 
f95c89
+/* hwrm_cfa_flow_alloc_cmd_err (size:64b/8B) */
f95c89
+struct hwrm_cfa_flow_alloc_cmd_err {
f95c89
+	u8	code;
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_UNKNOWN         0x0UL
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_L2_CONTEXT_TCAM 0x1UL
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_ACTION_RECORD   0x2UL
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_COUNTER    0x3UL
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_WILD_CARD_TCAM  0x4UL
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_HASH_COLLISION  0x5UL
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_KEY_EXISTS      0x6UL
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_CTXT_DB    0x7UL
f95c89
+	#define CFA_FLOW_ALLOC_CMD_ERR_CODE_LAST           CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_CTXT_DB
f95c89
+	u8	unused_0[7];
f95c89
+};
f95c89
+
f95c89
 /* hwrm_cfa_flow_free_input (size:256b/32B) */
f95c89
 struct hwrm_cfa_flow_free_input {
f95c89
 	__le16	req_type;
f95c89
@@ -6305,7 +6341,7 @@
f95c89
 	__le32	unused_0;
f95c89
 };
f95c89
 
f95c89
-/* hwrm_cfa_eem_qcaps_output (size:256b/32B) */
f95c89
+/* hwrm_cfa_eem_qcaps_output (size:320b/40B) */
f95c89
 struct hwrm_cfa_eem_qcaps_output {
f95c89
 	__le16	error_code;
f95c89
 	__le16	req_type;
f95c89
@@ -6322,15 +6358,17 @@
f95c89
 	#define CFA_EEM_QCAPS_RESP_SUPPORTED_KEY1_TABLE                       0x2UL
f95c89
 	#define CFA_EEM_QCAPS_RESP_SUPPORTED_EXTERNAL_RECORD_TABLE            0x4UL
f95c89
 	#define CFA_EEM_QCAPS_RESP_SUPPORTED_EXTERNAL_FLOW_COUNTERS_TABLE     0x8UL
f95c89
+	#define CFA_EEM_QCAPS_RESP_SUPPORTED_FID_TABLE                        0x10UL
f95c89
 	__le32	max_entries_supported;
f95c89
 	__le16	key_entry_size;
f95c89
 	__le16	record_entry_size;
f95c89
 	__le16	efc_entry_size;
f95c89
-	u8	unused_1;
f95c89
+	__le16	fid_entry_size;
f95c89
+	u8	unused_1[7];
f95c89
 	u8	valid;
f95c89
 };
f95c89
 
f95c89
-/* hwrm_cfa_eem_cfg_input (size:320b/40B) */
f95c89
+/* hwrm_cfa_eem_cfg_input (size:384b/48B) */
f95c89
 struct hwrm_cfa_eem_cfg_input {
f95c89
 	__le16	req_type;
f95c89
 	__le16	cmpl_ring;
f95c89
@@ -6350,6 +6388,9 @@
f95c89
 	__le16	key1_ctx_id;
f95c89
 	__le16	record_ctx_id;
f95c89
 	__le16	efc_ctx_id;
f95c89
+	__le16	fid_ctx_id;
f95c89
+	__le16	unused_2;
f95c89
+	__le32	unused_3;
f95c89
 };
f95c89
 
f95c89
 /* hwrm_cfa_eem_cfg_output (size:128b/16B) */
f95c89
@@ -6375,7 +6416,7 @@
f95c89
 	__le32	unused_0;
f95c89
 };
f95c89
 
f95c89
-/* hwrm_cfa_eem_qcfg_output (size:192b/24B) */
f95c89
+/* hwrm_cfa_eem_qcfg_output (size:256b/32B) */
f95c89
 struct hwrm_cfa_eem_qcfg_output {
f95c89
 	__le16	error_code;
f95c89
 	__le16	req_type;
f95c89
@@ -6386,7 +6427,12 @@
f95c89
 	#define CFA_EEM_QCFG_RESP_FLAGS_PATH_RX               0x2UL
f95c89
 	#define CFA_EEM_QCFG_RESP_FLAGS_PREFERRED_OFFLOAD     0x4UL
f95c89
 	__le32	num_entries;
f95c89
-	u8	unused_0[7];
f95c89
+	__le16	key0_ctx_id;
f95c89
+	__le16	key1_ctx_id;
f95c89
+	__le16	record_ctx_id;
f95c89
+	__le16	efc_ctx_id;
f95c89
+	__le16	fid_ctx_id;
f95c89
+	u8	unused_2[5];
f95c89
 	u8	valid;
f95c89
 };
f95c89
 
f95c89
@@ -6567,6 +6613,31 @@
f95c89
 	__le64	tpa_aborts;
f95c89
 };
f95c89
 
f95c89
+/* ctx_hw_stats_ext (size:1344b/168B) */
f95c89
+struct ctx_hw_stats_ext {
f95c89
+	__le64	rx_ucast_pkts;
f95c89
+	__le64	rx_mcast_pkts;
f95c89
+	__le64	rx_bcast_pkts;
f95c89
+	__le64	rx_discard_pkts;
f95c89
+	__le64	rx_drop_pkts;
f95c89
+	__le64	rx_ucast_bytes;
f95c89
+	__le64	rx_mcast_bytes;
f95c89
+	__le64	rx_bcast_bytes;
f95c89
+	__le64	tx_ucast_pkts;
f95c89
+	__le64	tx_mcast_pkts;
f95c89
+	__le64	tx_bcast_pkts;
f95c89
+	__le64	tx_discard_pkts;
f95c89
+	__le64	tx_drop_pkts;
f95c89
+	__le64	tx_ucast_bytes;
f95c89
+	__le64	tx_mcast_bytes;
f95c89
+	__le64	tx_bcast_bytes;
f95c89
+	__le64	rx_tpa_eligible_pkt;
f95c89
+	__le64	rx_tpa_eligible_bytes;
f95c89
+	__le64	rx_tpa_pkt;
f95c89
+	__le64	rx_tpa_bytes;
f95c89
+	__le64	rx_tpa_errors;
f95c89
+};
f95c89
+
f95c89
 /* hwrm_stat_ctx_alloc_input (size:256b/32B) */
f95c89
 struct hwrm_stat_ctx_alloc_input {
f95c89
 	__le16	req_type;
f95c89
@@ -6578,7 +6649,8 @@
f95c89
 	__le32	update_period_ms;
f95c89
 	u8	stat_ctx_flags;
f95c89
 	#define STAT_CTX_ALLOC_REQ_STAT_CTX_FLAGS_ROCE     0x1UL
f95c89
-	u8	unused_0[3];
f95c89
+	u8	unused_0;
f95c89
+	__le16	stats_dma_length;
f95c89
 };
f95c89
 
f95c89
 /* hwrm_stat_ctx_alloc_output (size:128b/16B) */
f95c89
@@ -7204,7 +7276,9 @@
f95c89
 	u8	version_hi;
f95c89
 	u8	version_low;
f95c89
 	u8	seg_flags;
f95c89
-	u8	unused_0[7];
f95c89
+	u8	compress_flags;
f95c89
+	#define SFLAG_COMPRESSED_ZLIB     0x1UL
f95c89
+	u8	unused_0[6];
f95c89
 };
f95c89
 
f95c89
 /* hwrm_dbg_coredump_list_input (size:256b/32B) */
f95c89
@@ -7729,6 +7803,9 @@
f95c89
 	#define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_AES256          (0x2UL << 1)
f95c89
 	#define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH  (0x3UL << 1)
f95c89
 	#define NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_LAST           NVM_SET_VARIABLE_REQ_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH
f95c89
+	#define NVM_SET_VARIABLE_REQ_FLAGS_FLAGS_UNUSED_0_MASK        0x70UL
f95c89
+	#define NVM_SET_VARIABLE_REQ_FLAGS_FLAGS_UNUSED_0_SFT         4
f95c89
+	#define NVM_SET_VARIABLE_REQ_FLAGS_FACTORY_DEFAULT            0x80UL
f95c89
 	u8	unused_0;
f95c89
 };
f95c89