Skip to contentSkip to conversation

net/qede/base: update FW to 8.40.25.0

PATCH Superseded Rasesh Mody 3 participants 24 messages Sep 30, 2019 – Oct 11, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

cover net/qede/base: update FW to 8.40.25.0

Hi,

This patch series updates the FW to 8.40.25.0 and includes corresponding base driver changes. It also includes some enhancements and fixes. The PMD version is bumped to 2.11.0.1.

Please apply.

Thanks!
-Rasesh

Rasesh Mody (9):
net/qede/base: calculate right page index for PBL chains net/qede/base: change MFW mailbox command log verbosity net/qede/base: lock entire QM reconfiguration flow net/qede/base: rename HSI datatypes and funcs net/qede/base: update rt defs NVM cfg and mcp code net/qede/base: move dmae code to HSI net/qede/base: update HSI code
net/qede/base: update the FW to 8.40.25.0 net/qede: print adapter info during init failure

 drivers/net/qede/base/bcm_osal.c              |    1 +
 drivers/net/qede/base/bcm_osal.h              |    5 +-
 drivers/net/qede/base/common_hsi.h            |  257 +--
 drivers/net/qede/base/ecore.h                 |   77 +-
 drivers/net/qede/base/ecore_chain.h           |   84 +-
 drivers/net/qede/base/ecore_cxt.c             |  520 ++++---
 drivers/net/qede/base/ecore_cxt.h             |   12 +
 drivers/net/qede/base/ecore_dcbx.c            |    7 +-
 drivers/net/qede/base/ecore_dev.c             |  753 +++++----
 drivers/net/qede/base/ecore_dev_api.h         |   92 --
 drivers/net/qede/base/ecore_gtt_reg_addr.h    |   42 +-
 drivers/net/qede/base/ecore_gtt_values.h      |   18 +-
 drivers/net/qede/base/ecore_hsi_common.h      | 1134 +++++++-------
 drivers/net/qede/base/ecore_hsi_debug_tools.h |  475 +++---
 drivers/net/qede/base/ecore_hsi_eth.h         | 1386 ++++++++---------
 drivers/net/qede/base/ecore_hsi_init_func.h   |   25 +-
 drivers/net/qede/base/ecore_hsi_init_tool.h   |   42 +-
 drivers/net/qede/base/ecore_hw.c              |   68 +-
 drivers/net/qede/base/ecore_hw.h              |   98 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c   |  717 ++++-----
 drivers/net/qede/base/ecore_init_fw_funcs.h   |  107 +-
 drivers/net/qede/base/ecore_init_ops.c        |   66 +-
 drivers/net/qede/base/ecore_init_ops.h        |   12 +-
 drivers/net/qede/base/ecore_int.c             |  131 +-
 drivers/net/qede/base/ecore_int.h             |    4 +-
 drivers/net/qede/base/ecore_int_api.h         |   13 +-
 drivers/net/qede/base/ecore_iov_api.h         |    4 +-
 drivers/net/qede/base/ecore_iro.h             |  320 ++--
 drivers/net/qede/base/ecore_iro_values.h      |  336 ++--
 drivers/net/qede/base/ecore_l2.c              |   10 +-
 drivers/net/qede/base/ecore_l2_api.h          |    2 +
 drivers/net/qede/base/ecore_mcp.c             |  296 ++--
 drivers/net/qede/base/ecore_mcp.h             |    9 +-
 drivers/net/qede/base/ecore_proto_if.h        |    1 +
 drivers/net/qede/base/ecore_rt_defs.h         |  870 +++++------
 drivers/net/qede/base/ecore_sp_commands.c     |   15 +-
 drivers/net/qede/base/ecore_spq.c             |   55 +-
 drivers/net/qede/base/ecore_sriov.c           |  178 ++-
 drivers/net/qede/base/ecore_sriov.h           |    4 +-
 drivers/net/qede/base/ecore_vf.c              |   18 +-
 drivers/net/qede/base/eth_common.h            |  101 +-
 drivers/net/qede/base/mcp_public.h            |   59 +-
 drivers/net/qede/base/nvm_cfg.h               |  909 ++++++++++-
 drivers/net/qede/base/reg_addr.h              |   75 +-
 drivers/net/qede/qede_ethdev.c                |   54 +-
 drivers/net/qede/qede_ethdev.h                |   21 +-
 drivers/net/qede/qede_main.c                  |    2 +-
 drivers/net/qede/qede_rxtx.c                  |   28 +-
 48 files changed, 5471 insertions(+), 4042 deletions(-)
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/9 net/qede/base: calculate right page index for PBL chains

ecore_chain_set_prod/cons() sets the wrong page index in chains with non-power of 2 page count. Fix ecore_chain_set_prod/cons() for PBL chains with non power of 2 page count.
Calculate the right page index according to current indexes.

---
 drivers/net/qede/base/ecore_chain.h | 84 ++++++++++++++++++++---------
 1 file changed, 58 insertions(+), 26 deletions(-)
drivers/net/qede/base/ecore_chain.h +58 -26
index 6d0382d3a..c69920be5 100644
@@ -86,8 +86,8 @@ struct ecore_chain {
 		void		**pp_virt_addr_tbl;
 
 		union {
-			struct ecore_chain_pbl_u16	u16;
-			struct ecore_chain_pbl_u32	u32;
+			struct ecore_chain_pbl_u16	pbl_u16;
+			struct ecore_chain_pbl_u32	pbl_u32;
 		} c;
 	} pbl;
 
@@ -405,7 +405,7 @@ static OSAL_INLINE void *ecore_chain_produce(struct ecore_chain *p_chain)
 		if ((p_chain->u.chain16.prod_idx &
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_prod_idx = &p_chain->u.chain16.prod_idx;
-			p_prod_page_idx = &p_chain->pbl.c.u16.prod_page_idx;
+			p_prod_page_idx = &p_chain->pbl.c.pbl_u16.prod_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_prod_elem,
 						 p_prod_idx, p_prod_page_idx);
 		}
@@ -414,7 +414,7 @@ static OSAL_INLINE void *ecore_chain_produce(struct ecore_chain *p_chain)
 		if ((p_chain->u.chain32.prod_idx &
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_prod_idx = &p_chain->u.chain32.prod_idx;
-			p_prod_page_idx = &p_chain->pbl.c.u32.prod_page_idx;
+			p_prod_page_idx = &p_chain->pbl.c.pbl_u32.prod_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_prod_elem,
 						 p_prod_idx, p_prod_page_idx);
 		}
@@ -479,7 +479,7 @@ static OSAL_INLINE void *ecore_chain_consume(struct ecore_chain *p_chain)
 		if ((p_chain->u.chain16.cons_idx &
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_cons_idx = &p_chain->u.chain16.cons_idx;
-			p_cons_page_idx = &p_chain->pbl.c.u16.cons_page_idx;
+			p_cons_page_idx = &p_chain->pbl.c.pbl_u16.cons_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_cons_elem,
 						 p_cons_idx, p_cons_page_idx);
 		}
@@ -488,7 +488,7 @@ static OSAL_INLINE void *ecore_chain_consume(struct ecore_chain *p_chain)
 		if ((p_chain->u.chain32.cons_idx &
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_cons_idx = &p_chain->u.chain32.cons_idx;
-			p_cons_page_idx = &p_chain->pbl.c.u32.cons_page_idx;
+			p_cons_page_idx = &p_chain->pbl.c.pbl_u32.cons_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_cons_elem,
 						 p_cons_idx, p_cons_page_idx);
 		}
@@ -532,11 +532,11 @@ static OSAL_INLINE void ecore_chain_reset(struct ecore_chain *p_chain)
 		u32 reset_val = p_chain->page_cnt - 1;
 
 		if (is_chain_u16(p_chain)) {
-			p_chain->pbl.c.u16.prod_page_idx = (u16)reset_val;
-			p_chain->pbl.c.u16.cons_page_idx = (u16)reset_val;
+			p_chain->pbl.c.pbl_u16.prod_page_idx = (u16)reset_val;
+			p_chain->pbl.c.pbl_u16.cons_page_idx = (u16)reset_val;
 		} else {
-			p_chain->pbl.c.u32.prod_page_idx = reset_val;
-			p_chain->pbl.c.u32.cons_page_idx = reset_val;
+			p_chain->pbl.c.pbl_u32.prod_page_idx = reset_val;
+			p_chain->pbl.c.pbl_u32.cons_page_idx = reset_val;
 		}
 	}
 
@@ -725,18 +725,34 @@ static OSAL_INLINE void ecore_chain_set_prod(struct ecore_chain *p_chain,
 					     u32 prod_idx, void *p_prod_elem)
 {
 	if (p_chain->mode == ECORE_CHAIN_MODE_PBL) {
-		/* Use "prod_idx-1" since ecore_chain_produce() advances the
-		 * page index before the producer index when getting to
-		 * "next_page_mask".
+		u32 cur_prod, page_mask, page_cnt, page_diff;
+
+		cur_prod = is_chain_u16(p_chain) ? p_chain->u.chain16.prod_idx
+						 : p_chain->u.chain32.prod_idx;
+
+		/* Assume that number of elements in a page is power of 2 */
+		page_mask = ~p_chain->elem_per_page_mask;
+
+		/* Use "cur_prod - 1" and "prod_idx - 1" since producer index
+		 * reaches the first element of next page before the page index
+		 * is incremented. See ecore_chain_produce().
+		 * Index wrap around is not a problem because the difference
+		 * between current and given producer indexes is always
+		 * positive and lower than the chain's capacity.
 		 */
-		u32 elem_idx =
-			(prod_idx - 1 + p_chain->capacity) % p_chain->capacity;
-		u32 page_idx = elem_idx / p_chain->elem_per_page;
+		page_diff = (((cur_prod - 1) & page_mask) -
+			     ((prod_idx - 1) & page_mask)) /
+			    p_chain->elem_per_page;
 
+		page_cnt = ecore_chain_get_page_cnt(p_chain);
 		if (is_chain_u16(p_chain))
-			p_chain->pbl.c.u16.prod_page_idx = (u16)page_idx;
+			p_chain->pbl.c.pbl_u16.prod_page_idx =
+				(p_chain->pbl.c.pbl_u16.prod_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 		else
-			p_chain->pbl.c.u32.prod_page_idx = page_idx;
+			p_chain->pbl.c.pbl_u32.prod_page_idx =
+				(p_chain->pbl.c.pbl_u32.prod_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 	}
 
 	if (is_chain_u16(p_chain))
@@ -756,18 +772,34 @@ static OSAL_INLINE void ecore_chain_set_cons(struct ecore_chain *p_chain,
 					     u32 cons_idx, void *p_cons_elem)
 {
 	if (p_chain->mode == ECORE_CHAIN_MODE_PBL) {
-		/* Use "cons_idx-1" since ecore_chain_consume() advances the
-		 * page index before the consumer index when getting to
-		 * "next_page_mask".
+		u32 cur_cons, page_mask, page_cnt, page_diff;
+
+		cur_cons = is_chain_u16(p_chain) ? p_chain->u.chain16.cons_idx
+						 : p_chain->u.chain32.cons_idx;
+
+		/* Assume that number of elements in a page is power of 2 */
+		page_mask = ~p_chain->elem_per_page_mask;
+
+		/* Use "cur_cons - 1" and "cons_idx - 1" since consumer index
+		 * reaches the first element of next page before the page index
+		 * is incremented. See ecore_chain_consume().
+		 * Index wrap around is not a problem because the difference
+		 * between current and given consumer indexes is always
+		 * positive and lower than the chain's capacity.
 		 */
-		u32 elem_idx =
-			(cons_idx - 1 + p_chain->capacity) % p_chain->capacity;
-		u32 page_idx = elem_idx / p_chain->elem_per_page;
+		page_diff = (((cur_cons - 1) & page_mask) -
+			     ((cons_idx - 1) & page_mask)) /
+			    p_chain->elem_per_page;
 
+		page_cnt = ecore_chain_get_page_cnt(p_chain);
 		if (is_chain_u16(p_chain))
-			p_chain->pbl.c.u16.cons_page_idx = (u16)page_idx;
+			p_chain->pbl.c.pbl_u16.cons_page_idx =
+				(p_chain->pbl.c.pbl_u16.cons_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 		else
-			p_chain->pbl.c.u32.cons_page_idx = page_idx;
+			p_chain->pbl.c.pbl_u32.cons_page_idx =
+				(p_chain->pbl.c.pbl_u32.cons_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 	}
 
 	if (is_chain_u16(p_chain))
Signature · 1 line
2.18.0
#2 lore raw

PATCH 2/9 net/qede/base: change MFW mailbox command log verbosity

In reply to Rasesh Mody

Change management FW mailboxes DP_VERBOSE module to ECORE_MSG_HW

---
 drivers/net/qede/base/ecore_mcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/qede/base/ecore_mcp.c +2 -2
index 6c6560688..1a5152ec5 100644
@@ -469,7 +469,7 @@ static void __ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn,
 	/* Set the drv command along with the sequence number */
 	DRV_MB_WR(p_hwfn, p_ptt, drv_mb_header, (p_mb_params->cmd | seq_num));
 
-	DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
+	DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
 		   "MFW mailbox: command 0x%08x param 0x%08x\n",
 		   (p_mb_params->cmd | seq_num), p_mb_params->param);
 }
@@ -594,7 +594,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
 	ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
 	OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock);
 
-	DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
+	DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
 		   "MFW mailbox: response 0x%08x param 0x%08x [after %d.%03d ms]\n",
 		   p_mb_params->mcp_resp, p_mb_params->mcp_param,
 		   (cnt * delay) / 1000, (cnt * delay) % 1000);
Signature · 1 line
2.18.0
#3 lore raw

PATCH 3/9 net/qede/base: lock entire QM reconfiguration flow

In reply to Rasesh Mody

Multiple flows can issue QM reconfiguration, hence hold the lock longer to account for entire duration of reconfiguration flow.

---
 drivers/net/qede/base/ecore_dev.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/net/qede/base/ecore_dev.c +13 -11
index d7e1d7b32..b183519b5 100644
@@ -2291,18 +2291,21 @@ enum _ecore_status_t ecore_qm_reconf(struct ecore_hwfn *p_hwfn,
 {
 	struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
 	bool b_rc;
-	enum _ecore_status_t rc;
+	enum _ecore_status_t rc = ECORE_SUCCESS;
+
+	/* multiple flows can issue qm reconf. Need to lock */
+	OSAL_SPIN_LOCK(&qm_lock);
 
 	/* initialize ecore's qm data structure */
 	ecore_init_qm_info(p_hwfn);
 
 	/* stop PF's qm queues */
-	OSAL_SPIN_LOCK(&qm_lock);
 	b_rc = ecore_send_qm_stop_cmd(p_hwfn, p_ptt, false, true,
 				      qm_info->start_pq, qm_info->num_pqs);
-	OSAL_SPIN_UNLOCK(&qm_lock);
-	if (!b_rc)
-		return ECORE_INVAL;
+	if (!b_rc) {
+		rc = ECORE_INVAL;
+		goto unlock;
+	}
 
 	/* clear the QM_PF runtime phase leftovers from previous init */
 	ecore_init_clear_rt_data(p_hwfn);
@@ -2313,18 +2316,17 @@ enum _ecore_status_t ecore_qm_reconf(struct ecore_hwfn *p_hwfn,
 	/* activate init tool on runtime array */
 	rc = ecore_init_run(p_hwfn, p_ptt, PHASE_QM_PF, p_hwfn->rel_pf_id,
 			    p_hwfn->hw_info.hw_mode);
-	if (rc != ECORE_SUCCESS)
-		return rc;
 
 	/* start PF's qm queues */
-	OSAL_SPIN_LOCK(&qm_lock);
 	b_rc = ecore_send_qm_stop_cmd(p_hwfn, p_ptt, true, true,
 				      qm_info->start_pq, qm_info->num_pqs);
-	OSAL_SPIN_UNLOCK(&qm_lock);
 	if (!b_rc)
-		return ECORE_INVAL;
+		rc = ECORE_INVAL;
 
-	return ECORE_SUCCESS;
+unlock:
+	OSAL_SPIN_UNLOCK(&qm_lock);
+
+	return rc;
 }
 
 static enum _ecore_status_t ecore_alloc_qm_data(struct ecore_hwfn *p_hwfn)
Signature · 1 line
2.18.0
#4 lore raw

PATCH 4/9 net/qede/base: rename HSI datatypes and funcs

In reply to Rasesh Mody

This patch changes code with E4/E5/e4/e5/BB_K2 prefixes and suffixes.
- HSI datatypes renaming - removed all e5 datatypes and renamed all e4 datatypes to be prefix less/suffix less. (s/_E4//; s/_e4//; s/E4_//).
- HSI functions - removed e4/e5 prefixes/suffixes.

---
 drivers/net/qede/base/common_hsi.h          |   93 +-
 drivers/net/qede/base/ecore_cxt.c           |    4 +-
 drivers/net/qede/base/ecore_dcbx.c          |    2 +-
 drivers/net/qede/base/ecore_dev.c           |  116 +-
 drivers/net/qede/base/ecore_hsi_common.h    |  847 +++++-------
 drivers/net/qede/base/ecore_hsi_eth.h       | 1308 ++++++++-----------
 drivers/net/qede/base/ecore_hsi_init_tool.h |    4 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c |   41 +-
 drivers/net/qede/base/ecore_int.c           |    8 +-
 drivers/net/qede/base/ecore_int.h           |    4 +-
 drivers/net/qede/base/ecore_int_api.h       |    6 +-
 drivers/net/qede/base/ecore_iov_api.h       |    4 +-
 drivers/net/qede/base/ecore_mcp.c           |    4 +-
 drivers/net/qede/base/ecore_spq.c           |    8 +-
 drivers/net/qede/base/ecore_sriov.c         |    4 +-
 drivers/net/qede/base/ecore_sriov.h         |    4 +-
 drivers/net/qede/base/reg_addr.h            |   65 +-
 drivers/net/qede/qede_rxtx.c                |    8 +-
 18 files changed, 1076 insertions(+), 1454 deletions(-)
drivers/net/qede/base/common_hsi.h +26 -67
index 7047eb9f8..b878a92aa 100644
@@ -106,59 +106,43 @@
 /* PCI functions */
 #define MAX_NUM_PORTS_BB        (2)
 #define MAX_NUM_PORTS_K2        (4)
-#define MAX_NUM_PORTS_E5        (4)
-#define MAX_NUM_PORTS           (MAX_NUM_PORTS_E5)
+#define MAX_NUM_PORTS           (MAX_NUM_PORTS_K2)
 
 #define MAX_NUM_PFS_BB          (8)
 #define MAX_NUM_PFS_K2          (16)
-#define MAX_NUM_PFS_E5          (16)
-#define MAX_NUM_PFS             (MAX_NUM_PFS_E5)
+#define MAX_NUM_PFS             (MAX_NUM_PFS_K2)
 #define MAX_NUM_OF_PFS_IN_CHIP  (16) /* On both engines */
 
 #define MAX_NUM_VFS_BB          (120)
 #define MAX_NUM_VFS_K2          (192)
-#define MAX_NUM_VFS_E4          (MAX_NUM_VFS_K2)
-#define MAX_NUM_VFS_E5          (240)
-#define COMMON_MAX_NUM_VFS      (MAX_NUM_VFS_E5)
+#define COMMON_MAX_NUM_VFS      (MAX_NUM_VFS_K2)
 
 #define MAX_NUM_FUNCTIONS_BB    (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB)
 #define MAX_NUM_FUNCTIONS_K2    (MAX_NUM_PFS_K2 + MAX_NUM_VFS_K2)
-#define MAX_NUM_FUNCTIONS       (MAX_NUM_PFS + MAX_NUM_VFS_E4)
 
 /* in both BB and K2, the VF number starts from 16. so for arrays containing all
  * possible PFs and VFs - we need a constant for this size
  */
 #define MAX_FUNCTION_NUMBER_BB      (MAX_NUM_PFS + MAX_NUM_VFS_BB)
 #define MAX_FUNCTION_NUMBER_K2      (MAX_NUM_PFS + MAX_NUM_VFS_K2)
-#define MAX_FUNCTION_NUMBER_E4      (MAX_NUM_PFS + MAX_NUM_VFS_E4)
-#define MAX_FUNCTION_NUMBER_E5      (MAX_NUM_PFS + MAX_NUM_VFS_E5)
-#define COMMON_MAX_FUNCTION_NUMBER  (MAX_NUM_PFS + MAX_NUM_VFS_E5)
+#define COMMON_MAX_FUNCTION_NUMBER  (MAX_NUM_PFS + MAX_NUM_VFS_K2)
 
 #define MAX_NUM_VPORTS_K2       (208)
 #define MAX_NUM_VPORTS_BB       (160)
-#define MAX_NUM_VPORTS_E4       (MAX_NUM_VPORTS_K2)
-#define MAX_NUM_VPORTS_E5       (256)
-#define COMMON_MAX_NUM_VPORTS   (MAX_NUM_VPORTS_E5)
+#define COMMON_MAX_NUM_VPORTS   (MAX_NUM_VPORTS_K2)
 
 #define MAX_NUM_L2_QUEUES_BB	(256)
 #define MAX_NUM_L2_QUEUES_K2    (320)
-#define MAX_NUM_L2_QUEUES_E5    (320) /* TODO_E5_VITALY - fix to 512 */
-#define MAX_NUM_L2_QUEUES		(MAX_NUM_L2_QUEUES_E5)
 
 /* Traffic classes in network-facing blocks (PBF, BTB, NIG, BRB, PRS and QM) */
 #define NUM_PHYS_TCS_4PORT_K2     4
-#define NUM_PHYS_TCS_4PORT_TX_E5  6
-#define NUM_PHYS_TCS_4PORT_RX_E5  4
 #define NUM_OF_PHYS_TCS           8
 #define PURE_LB_TC                NUM_OF_PHYS_TCS
 #define NUM_TCS_4PORT_K2          (NUM_PHYS_TCS_4PORT_K2 + 1)
-#define NUM_TCS_4PORT_TX_E5       (NUM_PHYS_TCS_4PORT_TX_E5 + 1)
-#define NUM_TCS_4PORT_RX_E5       (NUM_PHYS_TCS_4PORT_RX_E5 + 1)
 #define NUM_OF_TCS                (NUM_OF_PHYS_TCS + 1)
 
 /* CIDs */
-#define NUM_OF_CONNECTION_TYPES_E4 (8)
-#define NUM_OF_CONNECTION_TYPES_E5 (16)
+#define NUM_OF_CONNECTION_TYPES (8)
 #define NUM_OF_TASK_TYPES       (8)
 #define NUM_OF_LCIDS            (320)
 #define NUM_OF_LTIDS            (320)
@@ -412,9 +396,8 @@
 #define CAU_FSM_ETH_TX  1
 
 /* Number of Protocol Indices per Status Block */
-#define PIS_PER_SB_E4    12
-#define PIS_PER_SB_E5    8
-#define MAX_PIS_PER_SB_E4	 OSAL_MAX_T(PIS_PER_SB_E4, PIS_PER_SB_E5)
+#define PIS_PER_SB    12
+#define MAX_PIS_PER_SB	 PIS_PER_SB
 
 /* fsm is stopped or not valid for this sb */
 #define CAU_HC_STOPPED_STATE		3
@@ -430,8 +413,7 @@
 
 #define MAX_SB_PER_PATH_K2			(368)
 #define MAX_SB_PER_PATH_BB			(288)
-#define MAX_SB_PER_PATH_E5			(512)
-#define MAX_TOT_SB_PER_PATH			MAX_SB_PER_PATH_E5
+#define MAX_TOT_SB_PER_PATH			MAX_SB_PER_PATH_K2
 
 #define MAX_SB_PER_PF_MIMD			129
 #define MAX_SB_PER_PF_SIMD			64
@@ -639,12 +621,8 @@
 #define MAX_NUM_ILT_RECORDS \
 	OSAL_MAX_T(PXP_NUM_ILT_RECORDS_BB, PXP_NUM_ILT_RECORDS_K2)
 
-#define PXP_NUM_ILT_RECORDS_E5 13664
-
-
 // Host Interface
-#define PXP_QUEUES_ZONE_MAX_NUM_E4	320
-#define PXP_QUEUES_ZONE_MAX_NUM_E5	512
+#define PXP_QUEUES_ZONE_MAX_NUM	320
 
 
 /*****************/
@@ -691,11 +669,12 @@
 /* PBF CONSTANTS  */
 /******************/
 
-/* Number of PBF command queue lines. Each line is 32B. */
-#define PBF_MAX_CMD_LINES_E4 3328
-#define PBF_MAX_CMD_LINES_E5 5280
+/* Number of PBF command queue lines. */
+#define PBF_MAX_CMD_LINES 3328 /* Each line is 256b */
 
 /* Number of BTB blocks. Each block is 256B. */
+#define BTB_MAX_BLOCKS_BB 1440 /* 2880 blocks of 128B */
+#define BTB_MAX_BLOCKS_K2 1840 /* 3680 blocks of 128B */
 #define BTB_MAX_BLOCKS 1440
 
 /*****************/
@@ -1435,40 +1414,20 @@ enum rss_hash_type {
 /*
  * status block structure
  */
-struct status_block_e4 {
-	__le16 pi_array[PIS_PER_SB_E4];
-	__le32 sb_num;
-#define STATUS_BLOCK_E4_SB_NUM_MASK      0x1FF
-#define STATUS_BLOCK_E4_SB_NUM_SHIFT     0
-#define STATUS_BLOCK_E4_ZERO_PAD_MASK    0x7F
-#define STATUS_BLOCK_E4_ZERO_PAD_SHIFT   9
-#define STATUS_BLOCK_E4_ZERO_PAD2_MASK   0xFFFF
-#define STATUS_BLOCK_E4_ZERO_PAD2_SHIFT  16
-	__le32 prod_index;
-#define STATUS_BLOCK_E4_PROD_INDEX_MASK  0xFFFFFF
-#define STATUS_BLOCK_E4_PROD_INDEX_SHIFT 0
-#define STATUS_BLOCK_E4_ZERO_PAD3_MASK   0xFF
-#define STATUS_BLOCK_E4_ZERO_PAD3_SHIFT  24
-};
-
-
-/*
- * status block structure
- */
-struct status_block_e5 {
-	__le16 pi_array[PIS_PER_SB_E5];
+struct status_block {
+	__le16 pi_array[PIS_PER_SB];
 	__le32 sb_num;
-#define STATUS_BLOCK_E5_SB_NUM_MASK      0x1FF
-#define STATUS_BLOCK_E5_SB_NUM_SHIFT     0
-#define STATUS_BLOCK_E5_ZERO_PAD_MASK    0x7F
-#define STATUS_BLOCK_E5_ZERO_PAD_SHIFT   9
-#define STATUS_BLOCK_E5_ZERO_PAD2_MASK   0xFFFF
-#define STATUS_BLOCK_E5_ZERO_PAD2_SHIFT  16
+#define STATUS_BLOCK_SB_NUM_MASK      0x1FF
+#define STATUS_BLOCK_SB_NUM_SHIFT     0
+#define STATUS_BLOCK_ZERO_PAD_MASK    0x7F
+#define STATUS_BLOCK_ZERO_PAD_SHIFT   9
+#define STATUS_BLOCK_ZERO_PAD2_MASK   0xFFFF
+#define STATUS_BLOCK_ZERO_PAD2_SHIFT  16
 	__le32 prod_index;
-#define STATUS_BLOCK_E5_PROD_INDEX_MASK  0xFFFFFF
-#define STATUS_BLOCK_E5_PROD_INDEX_SHIFT 0
-#define STATUS_BLOCK_E5_ZERO_PAD3_MASK   0xFF
-#define STATUS_BLOCK_E5_ZERO_PAD3_SHIFT  24
+#define STATUS_BLOCK_PROD_INDEX_MASK  0xFFFFFF
+#define STATUS_BLOCK_PROD_INDEX_SHIFT 0
+#define STATUS_BLOCK_ZERO_PAD3_MASK   0xFF
+#define STATUS_BLOCK_ZERO_PAD3_SHIFT  24
 };
 
 
drivers/net/qede/base/ecore_cxt.c +2 -2
index 5c3370e10..bc5628c4e 100644
@@ -54,8 +54,8 @@
 
 /* connection context union */
 union conn_context {
-	struct e4_core_conn_context core_ctx;
-	struct e4_eth_conn_context eth_ctx;
+	struct core_conn_context core_ctx;
+	struct eth_conn_context eth_ctx;
 };
 
 /* TYPE-0 task context - iSCSI, FCOE */
drivers/net/qede/base/ecore_dcbx.c +1 -1
index cbc69cde7..b82ca49ff 100644
@@ -159,7 +159,7 @@ ecore_dcbx_set_params(struct ecore_dcbx_results *p_data,
 	if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits) &&
 	    (type == DCBX_PROTOCOL_ROCE)) {
 		ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
-		ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_PCP_BB_K2, prio << 1);
+		ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_PCP, prio << 1);
 	}
 }
 
drivers/net/qede/base/ecore_dev.c +62 -54

230 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_common.h +338 -509

927 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_eth.h +571 -737

1,455 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_init_tool.h +2 -2
index 0e157f9bc..1fe4bfc61 100644
@@ -23,7 +23,6 @@
 enum chip_ids {
 	CHIP_BB,
 	CHIP_K2,
-	CHIP_E5,
 	MAX_CHIP_IDS
 };
 
@@ -134,7 +133,8 @@ enum init_modes {
 	MODE_PORTS_PER_ENG_2,
 	MODE_PORTS_PER_ENG_4,
 	MODE_100G,
-	MODE_E5,
+	MODE_SKIP_PRAM_INIT,
+	MODE_EMUL_MAC,
 	MAX_INIT_MODES
 };
 
drivers/net/qede/base/ecore_init_fw_funcs.c +19 -22

71 lines not on this page · raw message

drivers/net/qede/base/ecore_int.c +4 -4
index 7368d55f7..c8536380c 100644
@@ -29,7 +29,7 @@ struct ecore_pi_info {
 struct ecore_sb_sp_info {
 	struct ecore_sb_info sb_info;
 	/* per protocol index data */
-	struct ecore_pi_info pi_info_arr[PIS_PER_SB_E4];
+	struct ecore_pi_info pi_info_arr[MAX_PIS_PER_SB];
 };
 
 enum ecore_attention_type {
@@ -1514,7 +1514,7 @@ static void _ecore_int_cau_conf_pi(struct ecore_hwfn *p_hwfn,
 	if (IS_VF(p_hwfn->p_dev))
 		return;/* @@@TBD MichalK- VF CAU... */
 
-	sb_offset = igu_sb_id * PIS_PER_SB_E4;
+	sb_offset = igu_sb_id * MAX_PIS_PER_SB;
 	OSAL_MEMSET(&pi_entry, 0, sizeof(struct cau_pi_entry));
 
 	SET_FIELD(pi_entry.prod, CAU_PI_ENTRY_PI_TIMESET, timeset);
@@ -2692,10 +2692,10 @@ enum _ecore_status_t ecore_int_get_sb_dbg(struct ecore_hwfn *p_hwfn,
 	p_info->igu_cons = ecore_rd(p_hwfn, p_ptt,
 				    IGU_REG_CONSUMER_MEM + sbid * 4);
 
-	for (i = 0; i < PIS_PER_SB_E4; i++)
+	for (i = 0; i < MAX_PIS_PER_SB; i++)
 		p_info->pi[i] = (u16)ecore_rd(p_hwfn, p_ptt,
 					      CAU_REG_PI_MEMORY +
-					      sbid * 4 * PIS_PER_SB_E4 +
+					      sbid * 4 * MAX_PIS_PER_SB +
 					      i * 4);
 
 	return ECORE_SUCCESS;
drivers/net/qede/base/ecore_int.h +2 -2
index ff2310cff..5042cd1d1 100644
@@ -16,8 +16,8 @@
 #define ECORE_SB_ATT_IDX	0x0001
 #define ECORE_SB_EVENT_MASK	0x0003
 
-#define SB_ALIGNED_SIZE(p_hwfn)					\
-	ALIGNED_TYPE_SIZE(struct status_block_e4, p_hwfn)
+#define SB_ALIGNED_SIZE(p_hwfn) \
+	ALIGNED_TYPE_SIZE(struct status_block, p_hwfn)
 
 #define ECORE_SB_INVALID_IDX	0xffff
 
drivers/net/qede/base/ecore_int_api.h +3 -3
index 42538a46c..abea2a716 100644
@@ -24,7 +24,7 @@ enum ecore_int_mode {
 #endif
 
 struct ecore_sb_info {
-	struct status_block_e4 *sb_virt;
+	struct status_block *sb_virt;
 	dma_addr_t sb_phys;
 	u32 sb_ack;		/* Last given ack */
 	u16 igu_sb_id;
@@ -42,7 +42,7 @@ struct ecore_sb_info {
 struct ecore_sb_info_dbg {
 	u32 igu_prod;
 	u32 igu_cons;
-	u16 pi[PIS_PER_SB_E4];
+	u16 pi[MAX_PIS_PER_SB];
 };
 
 struct ecore_sb_cnt_info {
@@ -65,7 +65,7 @@ static OSAL_INLINE u16 ecore_sb_update_sb_idx(struct ecore_sb_info *sb_info)
 	/* barrier(); status block is written to by the chip */
 	/* FIXME: need some sort of barrier. */
 	prod = OSAL_LE32_TO_CPU(sb_info->sb_virt->prod_index) &
-	    STATUS_BLOCK_E4_PROD_INDEX_MASK;
+	       STATUS_BLOCK_PROD_INDEX_MASK;
 	if (sb_info->sb_ack != prod) {
 		sb_info->sb_ack = prod;
 		rc |= ECORE_SB_IDX;
drivers/net/qede/base/ecore_iov_api.h +2 -2
index 55de7086d..c998dbf8d 100644
@@ -740,7 +740,7 @@ ecore_iov_pf_configure_vf_queue_coalesce(struct ecore_hwfn *p_hwfn,
  * @param p_hwfn
  * @param rel_vf_id
  *
- * @return MAX_NUM_VFS_E4 in case no further active VFs, otherwise index.
+ * @return MAX_NUM_VFS_K2 in case no further active VFs, otherwise index.
  */
 u16 ecore_iov_get_next_active_vf(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);
 
@@ -764,7 +764,7 @@ void ecore_iov_set_vf_hw_channel(struct ecore_hwfn *p_hwfn, int vfid,
 
 #define ecore_for_each_vf(_p_hwfn, _i)					\
 	for (_i = ecore_iov_get_next_active_vf(_p_hwfn, 0);		\
-	     _i < MAX_NUM_VFS_E4;					\
+	     _i < MAX_NUM_VFS_K2;					\
 	     _i = ecore_iov_get_next_active_vf(_p_hwfn, _i + 1))
 
 #endif
drivers/net/qede/base/ecore_mcp.c +2 -2
index 1a5152ec5..23336c282 100644
@@ -1703,7 +1703,7 @@ static void ecore_mcp_update_stag(struct ecore_hwfn *p_hwfn,
 
 			/* Configure DB to add external vlan to EDPM packets */
 			ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
-			ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID_BB_K2,
+			ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID,
 				 p_hwfn->hw_info.ovlan);
 		} else {
 			ecore_wr(p_hwfn, p_ptt, NIG_REG_LLH_FUNC_TAG_EN, 0);
@@ -1711,7 +1711,7 @@ static void ecore_mcp_update_stag(struct ecore_hwfn *p_hwfn,
 
 			/* Configure DB to add external vlan to EDPM packets */
 			ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 0);
-			ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID_BB_K2, 0);
+			ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID, 0);
 		}
 
 		ecore_sp_pf_update_stag(p_hwfn);
drivers/net/qede/base/ecore_spq.c +4 -4
index 88ad961e7..486b21dd9 100644
@@ -188,7 +188,7 @@ ecore_spq_fill_entry(struct ecore_hwfn *p_hwfn, struct ecore_spq_entry *p_ent)
 static void ecore_spq_hw_initialize(struct ecore_hwfn *p_hwfn,
 				    struct ecore_spq *p_spq)
 {
-	struct e4_core_conn_context *p_cxt;
+	struct core_conn_context *p_cxt;
 	struct ecore_cxt_info cxt_info;
 	u16 physical_q;
 	enum _ecore_status_t rc;
@@ -210,14 +210,14 @@ static void ecore_spq_hw_initialize(struct ecore_hwfn *p_hwfn,
 
 	if (ECORE_IS_BB(p_hwfn->p_dev) || ECORE_IS_AH(p_hwfn->p_dev)) {
 		SET_FIELD(p_cxt->xstorm_ag_context.flags10,
-			  E4_XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN, 1);
+			  XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN, 1);
 		SET_FIELD(p_cxt->xstorm_ag_context.flags1,
-			  E4_XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE, 1);
+			  XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE, 1);
 		/* SET_FIELD(p_cxt->xstorm_ag_context.flags10,
 		 *	  E4_XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_EN, 1);
 		 */
 		SET_FIELD(p_cxt->xstorm_ag_context.flags9,
-			  E4_XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN, 1);
+			  XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN, 1);
 	}
 
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_sriov.c +2 -2
index 7d73ef9fb..d771ac6d4 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_sriov.h +2 -2
index 50c7d2c93..e748e67d7 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/reg_addr.h +30 -35

65 lines not on this page · raw message

drivers/net/qede/qede_rxtx.c +4 -4
index dbb74fc64..abc86402d 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.18.0

Part of the diff is not shown here. View the raw message.

#5 lore raw

PATCH 5/9 net/qede/base: update rt defs NVM cfg and mcp code

In reply to Rasesh Mody

Update and add runtime array offsets (rt defs), non-volatile memory configuration options (nvm cfg) and management co-processor (mcp) shared code in preparation to update the firmware to version 8.40.25.0.

---
 drivers/net/qede/base/bcm_osal.h      |   5 +-
 drivers/net/qede/base/ecore_rt_defs.h | 870 +++++++++++-------------
 drivers/net/qede/base/mcp_public.h    |  59 +-
 drivers/net/qede/base/nvm_cfg.h       | 909 +++++++++++++++++++++++++-
 4 files changed, 1351 insertions(+), 492 deletions(-)
drivers/net/qede/base/bcm_osal.h +3 -2
index 51edc4151..0f09557cf 100644
@@ -148,8 +148,8 @@ void osal_dma_free_mem(struct ecore_dev *edev, dma_addr_t phys);
 			      ((u8 *)(uintptr_t)(_p_hwfn->doorbells) +	\
 			      (_db_addr)), (u32)_val)
 
-#define DIRECT_REG_WR64(hwfn, addr, value) nothing
-#define DIRECT_REG_RD64(hwfn, addr) 0
+#define DIRECT_REG_RD64(hwfn, addr) rte_read64(addr)
+#define DIRECT_REG_WR64(hwfn, addr, value) rte_write64((value), (addr))
 
 /* Mutexes */
 
@@ -455,6 +455,7 @@ u32 qede_crc32(u32 crc, u8 *ptr, u32 length);
 
 #define OSAL_DIV_S64(a, b)	((a) / (b))
 #define OSAL_LLDP_RX_TLVS(p_hwfn, tlv_buf, tlv_size) nothing
+#define OSAL_GET_EPOCH(p_hwfn)	0
 #define OSAL_DBG_ALLOC_USER_DATA(p_hwfn, user_data_ptr) (0)
 #define OSAL_DB_REC_OCCURRED(p_hwfn) nothing
 
drivers/net/qede/base/ecore_rt_defs.h +393 -477

905 lines not on this page · raw message

drivers/net/qede/base/mcp_public.h +56 -3

111 lines not on this page · raw message

drivers/net/qede/base/nvm_cfg.h +899 -10

1,010 lines not on this page · raw message

Signature · 1 line
2.18.0
#6 lore raw

PATCH 6/9 net/qede/base: move dmae code to HSI

In reply to Rasesh Mody

Move DMA engine (DMAE) structures from base driver to HSI module. Use DMAE_PARAMS_* in place of ECORE_DMAE_FLAG_*. Enforce SET_FIELD() macro where appropriate.

---
 drivers/net/qede/base/ecore_dev.c        | 12 ++--
 drivers/net/qede/base/ecore_dev_api.h    | 92 ------------------------
 drivers/net/qede/base/ecore_hsi_common.h | 58 ++++++++++++++-
 drivers/net/qede/base/ecore_hw.c         | 52 ++++++++------
 drivers/net/qede/base/ecore_hw.h         | 88 +++++++++++++++++------
 drivers/net/qede/base/ecore_init_ops.c   |  4 +-
 drivers/net/qede/base/ecore_sriov.c      | 23 +++---
 7 files changed, 174 insertions(+), 155 deletions(-)
drivers/net/qede/base/ecore_dev.c +6 -6
index 749aea4e8..2c135afd2 100644
@@ -950,7 +950,7 @@ ecore_llh_access_filter(struct ecore_hwfn *p_hwfn,
 			bool b_write_access)
 {
 	u8 pfid = ECORE_PFID_BY_PPFID(p_hwfn, abs_ppfid);
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 	enum _ecore_status_t rc;
 	u32 addr;
 
@@ -973,15 +973,15 @@ ecore_llh_access_filter(struct ecore_hwfn *p_hwfn,
 	OSAL_MEMSET(&params, 0, sizeof(params));
 
 	if (b_write_access) {
-		params.flags = ECORE_DMAE_FLAG_PF_DST;
-		params.dst_pfid = pfid;
+		SET_FIELD(params.flags, DMAE_PARAMS_DST_PF_VALID, 0x1);
+		params.dst_pf_id = pfid;
 		rc = ecore_dmae_host2grc(p_hwfn, p_ptt,
 					 (u64)(osal_uintptr_t)&p_details->value,
 					 addr, 2 /* size_in_dwords */, &params);
 	} else {
-		params.flags = ECORE_DMAE_FLAG_PF_SRC |
-			       ECORE_DMAE_FLAG_COMPLETION_DST;
-		params.src_pfid = pfid;
+		SET_FIELD(params.flags, DMAE_PARAMS_SRC_PF_VALID, 0x1);
+		SET_FIELD(params.flags, DMAE_PARAMS_COMPLETION_DST, 0x1);
+		params.src_pf_id = pfid;
 		rc = ecore_dmae_grc2host(p_hwfn, p_ptt, addr,
 					 (u64)(osal_uintptr_t)&p_details->value,
 					 2 /* size_in_dwords */, &params);
drivers/net/qede/base/ecore_dev_api.h +0 -92

98 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_common.h +57 -1

70 lines not on this page · raw message

drivers/net/qede/base/ecore_hw.c +30 -22

120 lines not on this page · raw message

drivers/net/qede/base/ecore_hw.h +67 -21

106 lines not on this page · raw message

drivers/net/qede/base/ecore_init_ops.c +2 -2
index 044308bf4..8f7209100 100644
@@ -179,12 +179,12 @@ static enum _ecore_status_t ecore_init_fill_dmae(struct ecore_hwfn *p_hwfn,
 						 u32 addr, u32 fill_count)
 {
 	static u32 zero_buffer[DMAE_MAX_RW_SIZE];
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 
 	OSAL_MEMSET(zero_buffer, 0, sizeof(u32) * DMAE_MAX_RW_SIZE);
 
 	OSAL_MEMSET(&params, 0, sizeof(params));
-	params.flags = ECORE_DMAE_FLAG_RW_REPL_SRC;
+	SET_FIELD(params.flags, DMAE_PARAMS_RW_REPL_SRC, 0x1);
 	return ecore_dmae_host2grc(p_hwfn, p_ptt,
 				   (osal_uintptr_t)&zero_buffer[0],
 				   addr, fill_count, &params);
drivers/net/qede/base/ecore_sriov.c +12 -11
index d771ac6d4..264217252 100644
@@ -347,7 +347,7 @@ enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn *p_hwfn,
 {
 	struct ecore_bulletin_content *p_bulletin;
 	int crc_size = sizeof(p_bulletin->crc);
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 	struct ecore_vf_info *p_vf;
 
 	p_vf = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
@@ -371,8 +371,8 @@ enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn *p_hwfn,
 
 	/* propagate bulletin board via dmae to vm memory */
 	OSAL_MEMSET(&params, 0, sizeof(params));
-	params.flags = ECORE_DMAE_FLAG_VF_DST;
-	params.dst_vfid = p_vf->abs_vf_id;
+	SET_FIELD(params.flags, DMAE_PARAMS_DST_VF_VALID, 0x1);
+	params.dst_vf_id = p_vf->abs_vf_id;
 	return ecore_dmae_host2host(p_hwfn, p_ptt, p_vf->bulletin.phys,
 				    p_vf->vf_bulletin, p_vf->bulletin.size / 4,
 				    &params);
@@ -1374,7 +1374,7 @@ static void ecore_iov_send_response(struct ecore_hwfn *p_hwfn,
 				    u8 status)
 {
 	struct ecore_iov_vf_mbx *mbx = &p_vf->vf_mbx;
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 	u8 eng_vf_id;
 
 	mbx->reply_virt->default_resp.hdr.status = status;
@@ -1391,9 +1391,9 @@ static void ecore_iov_send_response(struct ecore_hwfn *p_hwfn,
 
 	eng_vf_id = p_vf->abs_vf_id;
 
-	OSAL_MEMSET(&params, 0, sizeof(struct ecore_dmae_params));
-	params.flags = ECORE_DMAE_FLAG_VF_DST;
-	params.dst_vfid = eng_vf_id;
+	OSAL_MEMSET(&params, 0, sizeof(struct dmae_params));
+	SET_FIELD(params.flags, DMAE_PARAMS_DST_VF_VALID, 0x1);
+	params.dst_vf_id = eng_vf_id;
 
 	ecore_dmae_host2host(p_hwfn, p_ptt, mbx->reply_phys + sizeof(u64),
 			     mbx->req_virt->first_tlv.reply_address +
@@ -4389,16 +4389,17 @@ u16 ecore_iov_get_next_active_vf(struct ecore_hwfn *p_hwfn, u16 rel_vf_id)
 enum _ecore_status_t ecore_iov_copy_vf_msg(struct ecore_hwfn *p_hwfn,
 					   struct ecore_ptt *ptt, int vfid)
 {
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 	struct ecore_vf_info *vf_info;
 
 	vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
 	if (!vf_info)
 		return ECORE_INVAL;
 
-	OSAL_MEMSET(&params, 0, sizeof(struct ecore_dmae_params));
-	params.flags = ECORE_DMAE_FLAG_VF_SRC | ECORE_DMAE_FLAG_COMPLETION_DST;
-	params.src_vfid = vf_info->abs_vf_id;
+	OSAL_MEMSET(&params, 0, sizeof(struct dmae_params));
+	SET_FIELD(params.flags, DMAE_PARAMS_SRC_VF_VALID, 0x1);
+	SET_FIELD(params.flags, DMAE_PARAMS_COMPLETION_DST, 0x1);
+	params.src_vf_id = vf_info->abs_vf_id;
 
 	if (ecore_dmae_host2host(p_hwfn, ptt,
 				 vf_info->vf_mbx.pending_req,
Signature · 1 line
2.18.0
#7 lore raw

PATCH 7/9 net/qede/base: update HSI code

In reply to Rasesh Mody

Update hardware software common base driver code in preparation to update the firmware to version 8.40.25.0.

---
 drivers/net/qede/base/bcm_osal.c              |   1 +
 drivers/net/qede/base/common_hsi.h            | 164 ++++--
 drivers/net/qede/base/ecore.h                 |   4 +-
 drivers/net/qede/base/ecore_cxt.c             |  23 +-
 drivers/net/qede/base/ecore_dev.c             |  21 +-
 drivers/net/qede/base/ecore_gtt_reg_addr.h    |  42 +-
 drivers/net/qede/base/ecore_gtt_values.h      |  18 +-
 drivers/net/qede/base/ecore_hsi_common.h      | 231 +++++++--
 drivers/net/qede/base/ecore_hsi_debug_tools.h | 475 ++++++++----------
 drivers/net/qede/base/ecore_hsi_eth.h         | 134 ++---
 drivers/net/qede/base/ecore_hsi_init_func.h   |  25 +-
 drivers/net/qede/base/ecore_hsi_init_tool.h   |  38 ++
 drivers/net/qede/base/ecore_hw.c              |  16 +
 drivers/net/qede/base/ecore_hw.h              |  10 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c   |   7 +-
 drivers/net/qede/base/ecore_init_ops.c        |  47 --
 drivers/net/qede/base/ecore_init_ops.h        |  10 -
 drivers/net/qede/base/ecore_iro.h             | 320 ++++++------
 drivers/net/qede/base/ecore_iro_values.h      | 336 ++++++++-----
 drivers/net/qede/base/ecore_mcp.c             |   1 +
 drivers/net/qede/base/eth_common.h            | 101 +++-
 drivers/net/qede/base/reg_addr.h              |  10 +
 drivers/net/qede/qede_rxtx.c                  |  16 +-
 23 files changed, 1218 insertions(+), 832 deletions(-)
drivers/net/qede/base/bcm_osal.c +1 -0
index 9915df44f..48d016e24 100644
@@ -10,6 +10,7 @@
 #include "bcm_osal.h"
 #include "ecore.h"
 #include "ecore_hw.h"
+#include "ecore_dev_api.h"
 #include "ecore_iov_api.h"
 #include "ecore_mcp_api.h"
 #include "ecore_l2_api.h"
drivers/net/qede/base/common_hsi.h +131 -33

291 lines not on this page · raw message

drivers/net/qede/base/ecore.h +2 -2
index 524a1dd46..b1d8706c9 100644
@@ -834,8 +834,8 @@ struct ecore_dev {
 	u8				cache_shift;
 
 	/* Init */
-	const struct iro		*iro_arr;
-	#define IRO (p_hwfn->p_dev->iro_arr)
+	const u32			*iro_arr;
+#define IRO	((const struct iro *)p_hwfn->p_dev->iro_arr)
 
 	/* HW functions */
 	u8				num_hwfns;
drivers/net/qede/base/ecore_cxt.c +11 -12
index bc5628c4e..0f04c9447 100644
@@ -190,9 +190,7 @@ struct ecore_cxt_mngr {
 
 	/* Acquired CIDs */
 	struct ecore_cid_acquired_map acquired[MAX_CONN_TYPES];
-	/* TBD - do we want this allocated to reserve space? */
-	struct ecore_cid_acquired_map
-		acquired_vf[MAX_CONN_TYPES][COMMON_MAX_NUM_VFS];
+	struct ecore_cid_acquired_map *acquired_vf[MAX_CONN_TYPES];
 
 	/* ILT  shadow table */
 	struct ecore_dma_mem *ilt_shadow;
@@ -1040,8 +1038,8 @@ static enum _ecore_status_t ecore_ilt_shadow_alloc(struct ecore_hwfn *p_hwfn)
 
 static void ecore_cid_map_free(struct ecore_hwfn *p_hwfn)
 {
+	u32 type, vf, max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
-	u32 type, vf;
 
 	for (type = 0; type < MAX_CONN_TYPES; type++) {
 		OSAL_FREE(p_hwfn->p_dev, p_mngr->acquired[type].cid_map);
@@ -1049,7 +1047,7 @@ static void ecore_cid_map_free(struct ecore_hwfn *p_hwfn)
 		p_mngr->acquired[type].max_count = 0;
 		p_mngr->acquired[type].start_cid = 0;
 
-		for (vf = 0; vf < COMMON_MAX_NUM_VFS; vf++) {
+		for (vf = 0; vf < max_num_vfs; vf++) {
 			OSAL_FREE(p_hwfn->p_dev,
 				  p_mngr->acquired_vf[type][vf].cid_map);
 			p_mngr->acquired_vf[type][vf].cid_map = OSAL_NULL;
@@ -1087,6 +1085,7 @@ ecore_cid_map_alloc_single(struct ecore_hwfn *p_hwfn, u32 type,
 static enum _ecore_status_t ecore_cid_map_alloc(struct ecore_hwfn *p_hwfn)
 {
 	struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
+	u32 max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	u32 start_cid = 0, vf_start_cid = 0;
 	u32 type, vf;
 
@@ -1101,7 +1100,7 @@ static enum _ecore_status_t ecore_cid_map_alloc(struct ecore_hwfn *p_hwfn)
 			goto cid_map_fail;
 
 		/* Handle VF maps */
-		for (vf = 0; vf < COMMON_MAX_NUM_VFS; vf++) {
+		for (vf = 0; vf < max_num_vfs; vf++) {
 			p_map = &p_mngr->acquired_vf[type][vf];
 			if (ecore_cid_map_alloc_single(p_hwfn, type,
 						       vf_start_cid,
@@ -1236,10 +1235,10 @@ void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn)
 void ecore_cxt_mngr_setup(struct ecore_hwfn *p_hwfn)
 {
 	struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
+	u32 len, max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	struct ecore_cid_acquired_map *p_map;
 	struct ecore_conn_type_cfg *p_cfg;
 	int type;
-	u32 len;
 
 	/* Reset acquired cids */
 	for (type = 0; type < MAX_CONN_TYPES; type++) {
@@ -1257,7 +1256,7 @@ void ecore_cxt_mngr_setup(struct ecore_hwfn *p_hwfn)
 		if (!p_cfg->cids_per_vf)
 			continue;
 
-		for (vf = 0; vf < COMMON_MAX_NUM_VFS; vf++) {
+		for (vf = 0; vf < max_num_vfs; vf++) {
 			p_map = &p_mngr->acquired_vf[type][vf];
 			len = DIV_ROUND_UP(p_map->max_count,
 					   BITS_PER_MAP_WORD) *
@@ -1818,16 +1817,16 @@ enum _ecore_status_t _ecore_cxt_acquire_cid(struct ecore_hwfn *p_hwfn,
 					    enum protocol_type type,
 					    u32 *p_cid, u8 vfid)
 {
+	u32 rel_cid, max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
 	struct ecore_cid_acquired_map *p_map;
-	u32 rel_cid;
 
 	if (type >= MAX_CONN_TYPES) {
 		DP_NOTICE(p_hwfn, true, "Invalid protocol type %d", type);
 		return ECORE_INVAL;
 	}
 
-	if (vfid >= COMMON_MAX_NUM_VFS && vfid != ECORE_CXT_PF_CID) {
+	if (vfid >= max_num_vfs && vfid != ECORE_CXT_PF_CID) {
 		DP_NOTICE(p_hwfn, true, "VF [%02x] is out of range\n", vfid);
 		return ECORE_INVAL;
 	}
@@ -1913,12 +1912,12 @@ static bool ecore_cxt_test_cid_acquired(struct ecore_hwfn *p_hwfn,
 
 void _ecore_cxt_release_cid(struct ecore_hwfn *p_hwfn, u32 cid, u8 vfid)
 {
+	u32 rel_cid, max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	struct ecore_cid_acquired_map *p_map = OSAL_NULL;
 	enum protocol_type type;
 	bool b_acquired;
-	u32 rel_cid;
 
-	if (vfid != ECORE_CXT_PF_CID && vfid > COMMON_MAX_NUM_VFS) {
+	if (vfid != ECORE_CXT_PF_CID && vfid > max_num_vfs) {
 		DP_NOTICE(p_hwfn, true,
 			  "Trying to return incorrect CID belonging to VF %02x\n",
 			  vfid);
drivers/net/qede/base/ecore_dev.c +9 -12
index 2c135afd2..2a11b4d29 100644
@@ -1843,7 +1843,7 @@ static void ecore_init_qm_vport_params(struct ecore_hwfn *p_hwfn)
 
 	/* all vports participate in weighted fair queueing */
 	for (i = 0; i < ecore_init_qm_get_num_vports(p_hwfn); i++)
-		qm_info->qm_vport_params[i].vport_wfq = 1;
+		qm_info->qm_vport_params[i].wfq = 1;
 }
 
 /* initialize qm port params */
@@ -2236,11 +2236,8 @@ static void ecore_dp_init_qm_params(struct ecore_hwfn *p_hwfn)
 	/* vport table */
 	for (i = 0; i < qm_info->num_vports; i++) {
 		vport = &qm_info->qm_vport_params[i];
-		DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
-			   "vport idx %d, vport_rl %d, wfq %d,"
-			   " first_tx_pq_id [ ",
-			   qm_info->start_vport + i, vport->vport_rl,
-			   vport->vport_wfq);
+		DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "vport idx %d, wfq %d, first_tx_pq_id [ ",
+			   qm_info->start_vport + i, vport->wfq);
 		for (tc = 0; tc < NUM_OF_TCS; tc++)
 			DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "%d ",
 				   vport->first_tx_pq_id[tc]);
@@ -2866,7 +2863,7 @@ static enum _ecore_status_t ecore_hw_init_common(struct ecore_hwfn *p_hwfn,
 	ecore_init_cau_rt_data(p_dev);
 
 	/* Program GTT windows */
-	ecore_gtt_init(p_hwfn, p_ptt);
+	ecore_gtt_init(p_hwfn);
 
 #ifndef ASIC_ONLY
 	if (CHIP_REV_IS_EMUL(p_dev)) {
@@ -6248,7 +6245,7 @@ enum _ecore_status_t ecore_set_txq_coalesce(struct ecore_hwfn *p_hwfn,
 
 /* Calculate final WFQ values for all vports and configure it.
  * After this configuration each vport must have
- * approx min rate =  vport_wfq * min_pf_rate / ECORE_WFQ_UNIT
+ * approx min rate =  wfq * min_pf_rate / ECORE_WFQ_UNIT
  */
 static void ecore_configure_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
 					       struct ecore_ptt *p_ptt,
@@ -6262,11 +6259,11 @@ static void ecore_configure_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
 	for (i = 0; i < p_hwfn->qm_info.num_vports; i++) {
 		u32 wfq_speed = p_hwfn->qm_info.wfq_data[i].min_speed;
 
-		vport_params[i].vport_wfq = (wfq_speed * ECORE_WFQ_UNIT) /
+		vport_params[i].wfq = (wfq_speed * ECORE_WFQ_UNIT) /
 		    min_pf_rate;
 		ecore_init_vport_wfq(p_hwfn, p_ptt,
 				     vport_params[i].first_tx_pq_id,
-				     vport_params[i].vport_wfq);
+				     vport_params[i].wfq);
 	}
 }
 
@@ -6275,7 +6272,7 @@ static void ecore_init_wfq_default_param(struct ecore_hwfn *p_hwfn)
 	int i;
 
 	for (i = 0; i < p_hwfn->qm_info.num_vports; i++)
-		p_hwfn->qm_info.qm_vport_params[i].vport_wfq = 1;
+		p_hwfn->qm_info.qm_vport_params[i].wfq = 1;
 }
 
 static void ecore_disable_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
@@ -6290,7 +6287,7 @@ static void ecore_disable_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
 		ecore_init_wfq_default_param(p_hwfn);
 		ecore_init_vport_wfq(p_hwfn, p_ptt,
 				     vport_params[i].first_tx_pq_id,
-				     vport_params[i].vport_wfq);
+				     vport_params[i].wfq);
 	}
 }
 
drivers/net/qede/base/ecore_gtt_reg_addr.h +26 -16

69 lines not on this page · raw message

drivers/net/qede/base/ecore_gtt_values.h +9 -9
index adc20c0ce..2035bed5c 100644
@@ -13,15 +13,15 @@ static u32 pxp_global_win[] = {
 	0x1c80, /* win 3: addr=0x1c80000, size=4096 bytes */
 	0x1d00, /* win 4: addr=0x1d00000, size=4096 bytes */
 	0x1d01, /* win 5: addr=0x1d01000, size=4096 bytes */
-	0x1d80, /* win 6: addr=0x1d80000, size=4096 bytes */
-	0x1d81, /* win 7: addr=0x1d81000, size=4096 bytes */
-	0x1d82, /* win 8: addr=0x1d82000, size=4096 bytes */
-	0x1e00, /* win 9: addr=0x1e00000, size=4096 bytes */
-	0x1e80, /* win 10: addr=0x1e80000, size=4096 bytes */
-	0x1f00, /* win 11: addr=0x1f00000, size=4096 bytes */
-	0,
-	0,
-	0,
+	0x1d02, /* win 6: addr=0x1d02000, size=4096 bytes */
+	0x1d80, /* win 7: addr=0x1d80000, size=4096 bytes */
+	0x1d81, /* win 8: addr=0x1d81000, size=4096 bytes */
+	0x1d82, /* win 9: addr=0x1d82000, size=4096 bytes */
+	0x1e00, /* win 10: addr=0x1e00000, size=4096 bytes */
+	0x1e01, /* win 11: addr=0x1e01000, size=4096 bytes */
+	0x1e80, /* win 12: addr=0x1e80000, size=4096 bytes */
+	0x1f00, /* win 13: addr=0x1f00000, size=4096 bytes */
+	0x1c08, /* win 14: addr=0x1c08000, size=4096 bytes */
 	0,
 	0,
 	0,
drivers/net/qede/base/ecore_hsi_common.h +189 -42

377 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_debug_tools.h +199 -276

639 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_eth.h +76 -58

181 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_init_func.h +16 -9
index d77edaa1d..7efe2eff1 100644
@@ -88,7 +88,18 @@ struct init_nig_pri_tc_map_req {
 
 
 /*
- * QM per-port init parameters
+ * QM per global RL init parameters
+ */
+struct init_qm_global_rl_params {
+/* Rate limit in Mb/sec units. If set to zero, the link speed is uwsed
+ * instead.
+ */
+	u32 rate_limit;
+};
+
+
+/*
+ * QM per port init parameters
  */
 struct init_qm_port_params {
 	u8 active /* Indicates if this port is active */;
@@ -111,24 +122,20 @@ struct init_qm_pq_params {
 	u8 wrr_group /* WRR group */;
 /* Indicates if a rate limiter should be allocated for the PQ (0/1) */
 	u8 rl_valid;
+	u16 rl_id /* RL ID, valid only if rl_valid is true */;
 	u8 port_id /* Port ID */;
-	u8 reserved0;
-	u16 reserved1;
+	u8 reserved;
 };
 
 
 /*
- * QM per-vport init parameters
+ * QM per VPORT init parameters
  */
 struct init_qm_vport_params {
-/* rate limit in Mb/sec units. a value of 0 means dont configure. ignored if
- * VPORT RL is globally disabled.
- */
-	u32 vport_rl;
 /* WFQ weight. A value of 0 means dont configure. ignored if VPORT WFQ is
  * globally disabled.
  */
-	u16 vport_wfq;
+	u16 wfq;
 /* the first Tx PQ ID associated with this VPORT for each TC. */
 	u16 first_tx_pq_id[NUM_OF_TCS];
 };
drivers/net/qede/base/ecore_hsi_init_tool.h +38 -0
index 1fe4bfc61..4f878d061 100644
@@ -46,10 +46,24 @@ enum bin_init_buffer_type {
 	BIN_BUF_INIT_VAL /* init data */,
 	BIN_BUF_INIT_MODE_TREE /* init modes tree */,
 	BIN_BUF_INIT_IRO /* internal RAM offsets */,
+	BIN_BUF_INIT_OVERLAYS /* FW overlays (except overlay 0) */,
 	MAX_BIN_INIT_BUFFER_TYPE
 };
 
 
+/*
+ * FW overlay buffer header
+ */
+struct fw_overlay_buf_hdr {
+	u32 data;
+#define FW_OVERLAY_BUF_HDR_STORM_ID_MASK  0xFF /* Storm ID */
+#define FW_OVERLAY_BUF_HDR_STORM_ID_SHIFT 0
+/* Size of Storm FW overlay buffer in dwords */
+#define FW_OVERLAY_BUF_HDR_BUF_SIZE_MASK  0xFFFFFF
+#define FW_OVERLAY_BUF_HDR_BUF_SIZE_SHIFT 8
+};
+
+
 /*
  * init array header: raw
  */
@@ -117,6 +131,30 @@ union init_array_hdr {
 };
 
 
+enum dbg_bus_clients {
+	DBG_BUS_CLIENT_RBCN,
+	DBG_BUS_CLIENT_RBCP,
+	DBG_BUS_CLIENT_RBCR,
+	DBG_BUS_CLIENT_RBCT,
+	DBG_BUS_CLIENT_RBCU,
+	DBG_BUS_CLIENT_RBCF,
+	DBG_BUS_CLIENT_RBCX,
+	DBG_BUS_CLIENT_RBCS,
+	DBG_BUS_CLIENT_RBCH,
+	DBG_BUS_CLIENT_RBCZ,
+	DBG_BUS_CLIENT_OTHER_ENGINE,
+	DBG_BUS_CLIENT_TIMESTAMP,
+	DBG_BUS_CLIENT_CPU,
+	DBG_BUS_CLIENT_RBCY,
+	DBG_BUS_CLIENT_RBCQ,
+	DBG_BUS_CLIENT_RBCM,
+	DBG_BUS_CLIENT_RBCB,
+	DBG_BUS_CLIENT_RBCW,
+	DBG_BUS_CLIENT_RBCV,
+	MAX_DBG_BUS_CLIENTS
+};
+
+
 enum init_modes {
 	MODE_BB_A0_DEPRECATED,
 	MODE_BB,
drivers/net/qede/base/ecore_hw.c +16 -0
index 6a79db52e..0aed043bb 100644
@@ -12,6 +12,8 @@
 #include "reg_addr.h"
 #include "ecore_utils.h"
 #include "ecore_iov_api.h"
+#include "ecore_gtt_values.h"
+#include "ecore_dev_api.h"
 
 #ifndef ASIC_ONLY
 #define ECORE_EMUL_FACTOR 2000
@@ -78,6 +80,20 @@ enum _ecore_status_t ecore_ptt_pool_alloc(struct ecore_hwfn *p_hwfn)
 	return ECORE_SUCCESS;
 }
 
+void ecore_gtt_init(struct ecore_hwfn *p_hwfn)
+{
+	u32 gtt_base;
+	u32 i;
+
+	/* Set the global windows */
+	gtt_base = PXP_PF_WINDOW_ADMIN_START + PXP_PF_WINDOW_ADMIN_GLOBAL_START;
+
+	for (i = 0; i < OSAL_ARRAY_SIZE(pxp_global_win); i++)
+		if (pxp_global_win[i])
+			REG_WR(p_hwfn, gtt_base + i * PXP_GLOBAL_ENTRY_SIZE,
+			       pxp_global_win[i]);
+}
+
 void ecore_ptt_invalidate(struct ecore_hwfn *p_hwfn)
 {
 	struct ecore_ptt *p_ptt;
drivers/net/qede/base/ecore_hw.h +3 -7
index e43f337dc..238bdb9db 100644
@@ -8,9 +8,8 @@
 #define __ECORE_HW_H__
 
 #include "ecore.h"
-#include "ecore_dev_api.h"
 
-/* Forward decleration */
+/* Forward declaration */
 struct ecore_ptt;
 
 enum reserved_ptts {
@@ -53,10 +52,8 @@ enum reserved_ptts {
 * @brief ecore_gtt_init - Initialize GTT windows
 *
 * @param p_hwfn
-* @param p_ptt
 */
-void ecore_gtt_init(struct ecore_hwfn *p_hwfn,
-		    struct ecore_ptt *p_ptt);
+void ecore_gtt_init(struct ecore_hwfn *p_hwfn);
 
 /**
  * @brief ecore_ptt_invalidate - Forces all ptt entries to be re-configured
@@ -84,7 +81,6 @@ void ecore_ptt_pool_free(struct ecore_hwfn *p_hwfn);
 /**
  * @brief ecore_ptt_get_bar_addr - Get PPT's external BAR address
  *
- * @param p_hwfn
  * @param p_ptt
  *
  * @return u32
@@ -95,8 +91,8 @@ u32 ecore_ptt_get_bar_addr(struct ecore_ptt	*p_ptt);
  * @brief ecore_ptt_set_win - Set PTT Window's GRC BAR address
  *
  * @param p_hwfn
- * @param new_hw_addr
  * @param p_ptt
+ * @param new_hw_addr
  */
 void ecore_ptt_set_win(struct ecore_hwfn	*p_hwfn,
 		       struct ecore_ptt		*p_ptt,
drivers/net/qede/base/ecore_init_fw_funcs.c +3 -4
index 34bcc4249..9f614a4cf 100644
@@ -663,10 +663,10 @@ static int ecore_vp_wfq_rt_init(struct ecore_hwfn *p_hwfn,
 
 	/* Go over all PF VPORTs */
 	for (i = 0; i < num_vports; i++) {
-		if (!vport_params[i].vport_wfq)
+		if (!vport_params[i].wfq)
 			continue;
 
-		inc_val = QM_WFQ_INC_VAL(vport_params[i].vport_wfq);
+		inc_val = QM_WFQ_INC_VAL(vport_params[i].wfq);
 		if (inc_val > QM_WFQ_MAX_INC_VAL) {
 			DP_NOTICE(p_hwfn, true,
 				  "Invalid VPORT WFQ weight configuration\n");
@@ -709,8 +709,7 @@ static int ecore_vport_rl_rt_init(struct ecore_hwfn *p_hwfn,
 
 	/* Go over all PF VPORTs */
 	for (i = 0, vport_id = start_vport; i < num_vports; i++, vport_id++) {
-		inc_val = QM_RL_INC_VAL(vport_params[i].vport_rl ?
-			  vport_params[i].vport_rl : link_speed);
+		inc_val = QM_RL_INC_VAL(link_speed);
 		if (inc_val > QM_VP_RL_MAX_INC_VAL(link_speed)) {
 			DP_NOTICE(p_hwfn, true,
 				  "Invalid VPORT rate-limit configuration\n");
drivers/net/qede/base/ecore_init_ops.c +0 -47

53 lines not on this page · raw message

drivers/net/qede/base/ecore_init_ops.h +0 -10
index de7846d46..21e433309 100644
@@ -97,14 +97,4 @@ void ecore_init_store_rt_agg(struct ecore_hwfn *p_hwfn,
 #define STORE_RT_REG_AGG(hwfn, offset, val)			\
 	ecore_init_store_rt_agg(hwfn, offset, (u32 *)&val, sizeof(val))
 
-
-/**
- * @brief
- *      Initialize GTT global windows and set admin window
- *      related params of GTT/PTT to default values.
- *
- * @param p_hwfn
- */
-void ecore_gtt_init(struct ecore_hwfn *p_hwfn,
-		    struct ecore_ptt *p_ptt);
 #endif /* __ECORE_INIT_OPS__ */
drivers/net/qede/base/ecore_iro.h +176 -144

383 lines not on this page · raw message

drivers/net/qede/base/ecore_iro_values.h +215 -121

342 lines not on this page · raw message

drivers/net/qede/base/ecore_mcp.c +1 -0
index 23336c282..6559d8040 100644
@@ -24,6 +24,7 @@
 
 #define CHIP_MCP_RESP_ITER_US 10
 #define EMUL_MCP_RESP_ITER_US (1000 * 1000)
+#define GRCBASE_MCP	0xe00000
 
 #define ECORE_DRV_MB_MAX_RETRIES (500 * 1000)	/* Account for 5 sec */
 #define ECORE_MCP_RESET_RETRIES (50 * 1000)	/* Account for 500 msec */
drivers/net/qede/base/eth_common.h +79 -22

175 lines not on this page · raw message

drivers/net/qede/base/reg_addr.h +10 -0
index 9277b46fa..91d889dc8 100644
@@ -1235,3 +1235,13 @@
 #define NIG_REG_PPF_TO_ENGINE_SEL 0x508900UL
 #define NIG_REG_LLH_ENG_CLS_ROCE_QP_SEL 0x501b98UL
 #define NIG_REG_LLH_FUNC_FILTER_HDR_SEL 0x501b40UL
+
+#define MCP_REG_CACHE_PAGING_ENABLE 0xe06304UL
+#define PSWRQ2_REG_RESET_STT 0x240008UL
+#define PSWRQ2_REG_PRTY_STS_WR_H_0 0x240208UL
+#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0
+#define PGLUE_B_REG_MASTER_DISCARD_NBLOCK 0x2aa58cUL
+#define PGLUE_B_REG_PRTY_STS_WR_H_0 0x2a8208UL
+#define DORQ_REG_VF_USAGE_CNT_LIM 0x1009ccUL
+#define PGLUE_B_REG_SR_IOV_DISABLED_REQUEST 0x2aa06cUL
+#define PGLUE_B_REG_SR_IOV_DISABLED_REQUEST_CLR 0x2aa070UL
drivers/net/qede/qede_rxtx.c +8 -8
index abc86402d..77ee3b34f 100644
@@ -1602,17 +1602,17 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			/* Mark it as LRO packet */
 			ol_flags |= PKT_RX_LRO;
 			/* In split mode,  seg_len is same as len_on_first_bd
-			 * and ext_bd_len_list will be empty since there are
+			 * and bw_ext_bd_len_list will be empty since there are
 			 * no additional buffers
 			 */
 			PMD_RX_LOG(INFO, rxq,
-			    "TPA start[%d] - len_on_first_bd %d header %d"
-			    " [bd_list[0] %d], [seg_len %d]\n",
-			    cqe_start_tpa->tpa_agg_index,
-			    rte_le_to_cpu_16(cqe_start_tpa->len_on_first_bd),
-			    cqe_start_tpa->header_len,
-			    rte_le_to_cpu_16(cqe_start_tpa->ext_bd_len_list[0]),
-			    rte_le_to_cpu_16(cqe_start_tpa->seg_len));
+			 "TPA start[%d] - len_on_first_bd %d header %d"
+			 " [bd_list[0] %d], [seg_len %d]\n",
+			 cqe_start_tpa->tpa_agg_index,
+			 rte_le_to_cpu_16(cqe_start_tpa->len_on_first_bd),
+			 cqe_start_tpa->header_len,
+			 rte_le_to_cpu_16(cqe_start_tpa->bw_ext_bd_len_list[0]),
+			 rte_le_to_cpu_16(cqe_start_tpa->seg_len));
 
 		break;
 		case ETH_RX_CQE_TYPE_TPA_CONT:
Signature · 1 line
2.18.0
#8 lore raw

PATCH 8/9 net/qede/base: update the FW to 8.40.25.0

In reply to Rasesh Mody

This patch updates the FW to 8.40.25.0 and corresponding base driver changes. It also updates the PMD version to 2.11.0.1. The FW updates consists of enhancements and fixes as described below.

- VF RX queue start ramrod can get stuck due to completion error. Return EQ completion with error, when fail to load VF data. Use VF FID in RX queue start ramrod
- Fix big receive buffer initialization for 100G to address failure leading to BRB hardware assertion
- GRE tunnel traffic doesn't run when non-L2 ethernet protocol is enabled, fix FW to not forward tunneled SYN packets to LL2.
- Fix the FW assert that is caused during vport_update when tx-switching is enabled
- Add initial FW support for VF Representors
- Add ecore_get_hsi_def_val() API to get default HSI values
- Move following from .c to .h files:
TSTORM_QZONE_START and MSTORM_QZONE_START
enum ilt_clients
renamed struct ecore_dma_mem to phys_mem_desc and moved
- Add ecore_cxt_set_cli() and ecore_cxt_set_blk() APIs to set client config and block details
- Use SET_FIELD() macro where appropriate
- Address spell check and code alignment issues

---
 drivers/net/qede/base/ecore.h               |  73 ++-
 drivers/net/qede/base/ecore_cxt.c           | 497 ++++++++------
 drivers/net/qede/base/ecore_cxt.h           |  12 +
 drivers/net/qede/base/ecore_dcbx.c          |   5 +-
 drivers/net/qede/base/ecore_dev.c           | 586 ++++++++++-------
 drivers/net/qede/base/ecore_init_fw_funcs.c | 681 ++++++++++----------
 drivers/net/qede/base/ecore_init_fw_funcs.h | 107 ++-
 drivers/net/qede/base/ecore_init_ops.c      |  15 +-
 drivers/net/qede/base/ecore_init_ops.h      |   2 +-
 drivers/net/qede/base/ecore_int.c           | 129 ++--
 drivers/net/qede/base/ecore_int_api.h       |  11 +-
 drivers/net/qede/base/ecore_l2.c            |  10 +-
 drivers/net/qede/base/ecore_l2_api.h        |   2 +
 drivers/net/qede/base/ecore_mcp.c           | 287 +++++----
 drivers/net/qede/base/ecore_mcp.h           |   9 +-
 drivers/net/qede/base/ecore_proto_if.h      |   1 +
 drivers/net/qede/base/ecore_sp_commands.c   |  15 +-
 drivers/net/qede/base/ecore_spq.c           |  53 +-
 drivers/net/qede/base/ecore_sriov.c         | 157 +++--
 drivers/net/qede/base/ecore_vf.c            |  18 +-
 drivers/net/qede/qede_ethdev.h              |   2 +-
 drivers/net/qede/qede_main.c                |   2 +-
 drivers/net/qede/qede_rxtx.c                |   4 +-
 23 files changed, 1584 insertions(+), 1094 deletions(-)
drivers/net/qede/base/ecore.h +59 -14
index b1d8706c9..925b75cb9 100644
@@ -28,8 +28,8 @@
 #include "mcp_public.h"
 
 #define ECORE_MAJOR_VERSION		8
-#define ECORE_MINOR_VERSION		37
-#define ECORE_REVISION_VERSION		20
+#define ECORE_MINOR_VERSION		40
+#define ECORE_REVISION_VERSION		18
 #define ECORE_ENGINEERING_VERSION	0
 
 #define ECORE_VERSION							\
@@ -467,6 +467,8 @@ struct ecore_wfq_data {
 	bool configured;
 };
 
+#define OFLD_GRP_SIZE 4
+
 struct ecore_qm_info {
 	struct init_qm_pq_params    *qm_pq_params;
 	struct init_qm_vport_params *qm_vport_params;
@@ -513,6 +515,8 @@ struct ecore_fw_data {
 	const u8 *modes_tree_buf;
 	union init_op *init_ops;
 	const u32 *arr_data;
+	const u32 *fw_overlays;
+	u32 fw_overlays_len;
 	u32 init_ops_size;
 };
 
@@ -592,6 +596,7 @@ struct ecore_hwfn {
 
 	u8				num_funcs_on_engine;
 	u8				enabled_func_idx;
+	u8				num_funcs_on_port;
 
 	/* BAR access */
 	void OSAL_IOMEM			*regview;
@@ -745,7 +750,6 @@ struct ecore_dev {
 #endif
 #define ECORE_IS_AH(dev)	((dev)->type == ECORE_DEV_TYPE_AH)
 #define ECORE_IS_K2(dev)	ECORE_IS_AH(dev)
-#define ECORE_IS_E4(dev)	(ECORE_IS_BB(dev) || ECORE_IS_AH(dev))
 
 	u16 vendor_id;
 	u16 device_id;
@@ -893,6 +897,7 @@ struct ecore_dev {
 
 #ifndef ASIC_ONLY
 	bool				b_is_emul_full;
+	bool				b_is_emul_mac;
 #endif
 	/* LLH info */
 	u8				ppfid_bitmap;
@@ -911,16 +916,52 @@ struct ecore_dev {
 	u8				engine_for_debug;
 };
 
-#define NUM_OF_VFS(dev)		(ECORE_IS_BB(dev) ? MAX_NUM_VFS_BB \
-						  : MAX_NUM_VFS_K2)
-#define NUM_OF_L2_QUEUES(dev)	(ECORE_IS_BB(dev) ? MAX_NUM_L2_QUEUES_BB \
-						  : MAX_NUM_L2_QUEUES_K2)
-#define NUM_OF_PORTS(dev)	(ECORE_IS_BB(dev) ? MAX_NUM_PORTS_BB \
-						  : MAX_NUM_PORTS_K2)
-#define NUM_OF_SBS(dev)		(ECORE_IS_BB(dev) ? MAX_SB_PER_PATH_BB \
-						  : MAX_SB_PER_PATH_K2)
-#define NUM_OF_ENG_PFS(dev)	(ECORE_IS_BB(dev) ? MAX_NUM_PFS_BB \
-						  : MAX_NUM_PFS_K2)
+enum ecore_hsi_def_type {
+	ECORE_HSI_DEF_MAX_NUM_VFS,
+	ECORE_HSI_DEF_MAX_NUM_L2_QUEUES,
+	ECORE_HSI_DEF_MAX_NUM_PORTS,
+	ECORE_HSI_DEF_MAX_SB_PER_PATH,
+	ECORE_HSI_DEF_MAX_NUM_PFS,
+	ECORE_HSI_DEF_MAX_NUM_VPORTS,
+	ECORE_HSI_DEF_NUM_ETH_RSS_ENGINE,
+	ECORE_HSI_DEF_MAX_QM_TX_QUEUES,
+	ECORE_HSI_DEF_NUM_PXP_ILT_RECORDS,
+	ECORE_HSI_DEF_NUM_RDMA_STATISTIC_COUNTERS,
+	ECORE_HSI_DEF_MAX_QM_GLOBAL_RLS,
+	ECORE_HSI_DEF_MAX_PBF_CMD_LINES,
+	ECORE_HSI_DEF_MAX_BTB_BLOCKS,
+	ECORE_NUM_HSI_DEFS
+};
+
+u32 ecore_get_hsi_def_val(struct ecore_dev *p_dev,
+			  enum ecore_hsi_def_type type);
+
+#define NUM_OF_VFS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_VFS)
+#define NUM_OF_L2_QUEUES(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_L2_QUEUES)
+#define NUM_OF_PORTS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_PORTS)
+#define NUM_OF_SBS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_SB_PER_PATH)
+#define NUM_OF_ENG_PFS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_PFS)
+#define NUM_OF_VPORTS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_VPORTS)
+#define NUM_OF_RSS_ENGINES(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_NUM_ETH_RSS_ENGINE)
+#define NUM_OF_QM_TX_QUEUES(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_QM_TX_QUEUES)
+#define NUM_OF_PXP_ILT_RECORDS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_NUM_PXP_ILT_RECORDS)
+#define NUM_OF_RDMA_STATISTIC_COUNTERS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_NUM_RDMA_STATISTIC_COUNTERS)
+#define NUM_OF_QM_GLOBAL_RLS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_QM_GLOBAL_RLS)
+#define NUM_OF_PBF_CMD_LINES(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_PBF_CMD_LINES)
+#define NUM_OF_BTB_BLOCKS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_BTB_BLOCKS)
 
 #define CRC8_TABLE_SIZE 256
 
@@ -948,7 +989,6 @@ static OSAL_INLINE u8 ecore_concrete_to_sw_fid(u32 concrete_fid)
 }
 
 #define PKT_LB_TC 9
-#define MAX_NUM_VOQS_E4 20
 
 int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate);
 void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev,
@@ -1023,4 +1063,9 @@ enum _ecore_status_t ecore_all_ppfids_wr(struct ecore_hwfn *p_hwfn,
 enum _ecore_status_t ecore_llh_dump_ppfid(struct ecore_dev *p_dev, u8 ppfid);
 enum _ecore_status_t ecore_llh_dump_all(struct ecore_dev *p_dev);
 
+#define TSTORM_QZONE_START	PXP_VF_BAR0_START_SDM_ZONE_A
+
+#define MSTORM_QZONE_START(dev) \
+	(TSTORM_QZONE_START + (TSTORM_QZONE_SIZE * NUM_OF_L2_QUEUES(dev)))
+
 #endif /* __ECORE_H */
drivers/net/qede/base/ecore_cxt.c +288 -209

954 lines not on this page · raw message

drivers/net/qede/base/ecore_cxt.h +12 -0
index f8c955cac..55f08027d 100644
@@ -22,6 +22,18 @@ enum ecore_cxt_elem_type {
 	ECORE_ELEM_TASK
 };
 
+enum ilt_clients {
+	ILT_CLI_CDUC,
+	ILT_CLI_CDUT,
+	ILT_CLI_QM,
+	ILT_CLI_TM,
+	ILT_CLI_SRC,
+	ILT_CLI_TSDM,
+	ILT_CLI_RGFS,
+	ILT_CLI_TGFS,
+	ILT_CLI_MAX
+};
+
 u32 ecore_cxt_get_proto_cid_count(struct ecore_hwfn *p_hwfn,
 				  enum protocol_type type,
 				  u32 *vf_cid);
drivers/net/qede/base/ecore_dcbx.c +3 -2
index b82ca49ff..ccd4383bb 100644
@@ -310,8 +310,9 @@ ecore_dcbx_process_tlv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
 			continue;
 
 		/* if no app tlv was present, don't override in FW */
-		ecore_dcbx_update_app_info(p_data, p_hwfn, p_ptt, false,
-					   priority, tc, type);
+		ecore_dcbx_update_app_info(p_data, p_hwfn, p_ptt,
+					  p_data->arr[DCBX_PROTOCOL_ETH].enable,
+					  priority, tc, type);
 	}
 
 	return ECORE_SUCCESS;
drivers/net/qede/base/ecore_dev.c +342 -244

1,034 lines not on this page · raw message

drivers/net/qede/base/ecore_init_fw_funcs.c +346 -335

858 lines not on this page · raw message

drivers/net/qede/base/ecore_init_fw_funcs.h +79 -28

107 lines not on this page · raw message

drivers/net/qede/base/ecore_init_ops.c +11 -4
index ad8570a08..ea964ea2f 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_init_ops.h +1 -1
index 21e433309..0cbf293b3 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_int.c +83 -46

129 lines not on this page · raw message

drivers/net/qede/base/ecore_int_api.h +8 -3
index abea2a716..d7b6b86cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_l2.c +4 -6
index 5dcdc84fc..b20d83762 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_l2_api.h +2 -0
index acde81fad..bebf412ed 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_mcp.c +173 -114

287 lines not on this page · raw message

drivers/net/qede/base/ecore_mcp.h +7 -2
index 2c052b7fa..185cc2339 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_proto_if.h +1 -0
index f91b25e20..64509f7cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_sp_commands.c +10 -5
index 49a5ff552..9860a62b5 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_spq.c +33 -20

53 lines not on this page · raw message

drivers/net/qede/base/ecore_sriov.c +111 -46

157 lines not on this page · raw message

drivers/net/qede/base/ecore_vf.c +7 -11
index 3ba6a0cf2..24846cfb5 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_ethdev.h +1 -1
index b5f93e9fa..559638508 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_main.c +1 -1
index 8a108f99c..c9caec645 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_rxtx.c +2 -2
index 77ee3b34f..0ab11d500 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.18.0

Part of the diff is not shown here. View the raw message.

#9 lore raw

PATCH 9/9 net/qede: print adapter info during init failure

In reply to Rasesh Mody

Dump the info logs banner with available information in case of device initialization failure.

---
 drivers/net/qede/qede_ethdev.c | 54 +++++++++++++++++++++-------------
 drivers/net/qede/qede_ethdev.h | 19 ++++++++----
 2 files changed, 46 insertions(+), 27 deletions(-)
drivers/net/qede/qede_ethdev.c +33 -21
index 0c9f6590e..5dd49fc20 100644
@@ -278,30 +278,38 @@ static void qede_print_adapter_info(struct qede_dev *qdev)
 {
 	struct ecore_dev *edev = &qdev->edev;
 	struct qed_dev_info *info = &qdev->dev_info.common;
-	static char drv_ver[QEDE_PMD_DRV_VER_STR_SIZE];
 	static char ver_str[QEDE_PMD_DRV_VER_STR_SIZE];
 
-	DP_INFO(edev, "*********************************\n");
-	DP_INFO(edev, " DPDK version:%s\n", rte_version());
-	DP_INFO(edev, " Chip details : %s %c%d\n",
+	DP_INFO(edev, "**************************************************\n");
+	DP_INFO(edev, " DPDK version\t\t\t: %s\n", rte_version());
+	DP_INFO(edev, " Chip details\t\t\t: %s %c%d\n",
 		  ECORE_IS_BB(edev) ? "BB" : "AH",
 		  'A' + edev->chip_rev,
 		  (int)edev->chip_metal);
-	snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%d.%d.%d.%d",
-		 info->fw_major, info->fw_minor, info->fw_rev, info->fw_eng);
-	snprintf(drv_ver, QEDE_PMD_DRV_VER_STR_SIZE, "%s_%s",
-		 ver_str, QEDE_PMD_VERSION);
-	DP_INFO(edev, " Driver version : %s\n", drv_ver);
-	DP_INFO(edev, " Firmware version : %s\n", ver_str);
+	snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%s",
+		 QEDE_PMD_DRV_VERSION);
+	DP_INFO(edev, " Driver version\t\t\t: %s\n", ver_str);
+
+	snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%s",
+		 QEDE_PMD_BASE_VERSION);
+	DP_INFO(edev, " Base version\t\t\t: %s\n", ver_str);
+
+	snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%s", QEDE_PMD_FW_VERSION);
+	DP_INFO(edev, " Firmware version\t\t\t: %s\n", ver_str);
 
 	snprintf(ver_str, MCP_DRV_VER_STR_SIZE,
 		 "%d.%d.%d.%d",
-		(info->mfw_rev >> 24) & 0xff,
-		(info->mfw_rev >> 16) & 0xff,
-		(info->mfw_rev >> 8) & 0xff, (info->mfw_rev) & 0xff);
-	DP_INFO(edev, " Management Firmware version : %s\n", ver_str);
-	DP_INFO(edev, " Firmware file : %s\n", qede_fw_file);
-	DP_INFO(edev, "*********************************\n");
+		 (info->mfw_rev & QED_MFW_VERSION_3_MASK) >>
+		 QED_MFW_VERSION_3_OFFSET,
+		 (info->mfw_rev & QED_MFW_VERSION_2_MASK) >>
+		 QED_MFW_VERSION_2_OFFSET,
+		 (info->mfw_rev & QED_MFW_VERSION_1_MASK) >>
+		 QED_MFW_VERSION_1_OFFSET,
+		 (info->mfw_rev & QED_MFW_VERSION_0_MASK) >>
+		 QED_MFW_VERSION_0_OFFSET);
+	DP_INFO(edev, " Management Firmware version\t: %s\n", ver_str);
+	DP_INFO(edev, " Firmware file\t\t\t: %s\n", qede_fw_file);
+	DP_INFO(edev, "**************************************************\n");
 }
 
 static void qede_reset_queue_stats(struct qede_dev *qdev, bool xstats)
@@ -2435,6 +2443,10 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 				    dp_level, is_vf);
 	if (rc != 0) {
 		DP_ERR(edev, "qede probe failed rc %d\n", rc);
+		if (do_once) {
+			qede_print_adapter_info(adapter);
+			do_once = false;
+		}
 		return -ENODEV;
 	}
 	qede_update_pf_params(edev);
@@ -2515,6 +2527,11 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
 	qede_alloc_etherdev(adapter, &dev_info);
 
+	if (do_once) {
+		qede_print_adapter_info(adapter);
+		do_once = false;
+	}
+
 	adapter->ops->common->set_name(edev, edev->name);
 
 	if (!is_vf)
@@ -2571,11 +2588,6 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
 	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
 
-	if (do_once) {
-		qede_print_adapter_info(adapter);
-		do_once = false;
-	}
-
 	/* Bring-up the link */
 	qede_dev_set_link_state(eth_dev, true);
 
drivers/net/qede/qede_ethdev.h +13 -6
index 559638508..1ac2d086a 100644
@@ -42,20 +42,27 @@
 #define qede_stringify(x...)		qede_stringify1(x)
 
 /* Driver versions */
+#define QEDE_PMD_DRV_VER_STR_SIZE NAME_SIZE /* 128 */
 #define QEDE_PMD_VER_PREFIX		"QEDE PMD"
 #define QEDE_PMD_VERSION_MAJOR		2
 #define QEDE_PMD_VERSION_MINOR	        11
 #define QEDE_PMD_VERSION_REVISION       0
 #define QEDE_PMD_VERSION_PATCH	        1
 
-#define QEDE_PMD_VERSION qede_stringify(QEDE_PMD_VERSION_MAJOR) "."     \
-			 qede_stringify(QEDE_PMD_VERSION_MINOR) "."     \
-			 qede_stringify(QEDE_PMD_VERSION_REVISION) "."  \
-			 qede_stringify(QEDE_PMD_VERSION_PATCH)
+#define QEDE_PMD_DRV_VERSION qede_stringify(QEDE_PMD_VERSION_MAJOR) "."     \
+			     qede_stringify(QEDE_PMD_VERSION_MINOR) "."     \
+			     qede_stringify(QEDE_PMD_VERSION_REVISION) "."  \
+			     qede_stringify(QEDE_PMD_VERSION_PATCH)
 
-#define QEDE_PMD_DRV_VER_STR_SIZE NAME_SIZE
-#define QEDE_PMD_VER_PREFIX "QEDE PMD"
+#define QEDE_PMD_BASE_VERSION qede_stringify(ECORE_MAJOR_VERSION) "."       \
+			      qede_stringify(ECORE_MINOR_VERSION) "."       \
+			      qede_stringify(ECORE_REVISION_VERSION) "."    \
+			      qede_stringify(ECORE_ENGINEERING_VERSION)
 
+#define QEDE_PMD_FW_VERSION qede_stringify(FW_MAJOR_VERSION) "."            \
+			    qede_stringify(FW_MINOR_VERSION) "."            \
+			    qede_stringify(FW_REVISION_VERSION) "."         \
+			    qede_stringify(FW_ENGINEERING_VERSION)
 
 #define QEDE_RSS_INDIR_INITED     (1 << 0)
 #define QEDE_RSS_KEY_INITED       (1 << 1)
Signature · 1 line
2.18.0
#10 lore raw
In reply to Rasesh Mody
Quoted 12 lines · Rasesh Mody

Hi,

This patch series updates the FW to 8.40.25.0 and includes corresponding base driver changes. It also includes some enhancements and fixes. The PMD version is bumped to 2.11.0.1.

Please apply.

Thanks!
-Rasesh

Quoted 10 lines

Rasesh Mody (9):
net/qede/base: calculate right page index for PBL chains net/qede/base: change MFW mailbox command log verbosity net/qede/base: lock entire QM reconfiguration flow net/qede/base: rename HSI datatypes and funcs net/qede/base: update rt defs NVM cfg and mcp code net/qede/base: move dmae code to HSI net/qede/base: update HSI code
net/qede/base: update the FW to 8.40.25.0 net/qede: print adapter info during init failure

Hi Rasesh,

I understand it is the _base_ code(probably owned by someone else)but there are a lot of checkpatch issues[1] with this patch in base code. Is something can be fixed? if so, please send the next version else let us know.

[1]
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'map' - possible side-effects? #2927: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:163:
+#define QM_INIT_TX_PQ_MAP(p_hwfn, map, pq_id, vp_pq_id, \
+ rl_valid, rl_id, voq, wrr) \

+       do { \
+       OSAL_MEMSET(&map, 0, sizeof(map)); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_PQ_VALID, 1); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_VALID, rl_valid ? 1 : 0); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_ID, rl_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VP_PQ_ID, vp_pq_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VOQ, voq); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_WRR_WEIGHT_GROUP, wrr); \
+       STORE_RT_REG(p_hwfn, QM_REG_TXPQMAP_RT_OFFSET + pq_id, *((u32 *)&map));\
        } while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'map' may be better as '(map)' to avoid precedence issues
#2927: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:163:
+#define QM_INIT_TX_PQ_MAP(p_hwfn, map, pq_id, vp_pq_id, \
+ rl_valid, rl_id, voq, wrr) \

+       do { \
+       OSAL_MEMSET(&map, 0, sizeof(map)); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_PQ_VALID, 1); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_VALID, rl_valid ? 1 : 0); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_ID, rl_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VP_PQ_ID, vp_pq_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VOQ, voq); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_WRR_WEIGHT_GROUP, wrr); \
+       STORE_RT_REG(p_hwfn, QM_REG_TXPQMAP_RT_OFFSET + pq_id, *((u32 *)&map));\
        } while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'pq_id' may be better as '(pq_id)' to avoid precedence issues
#2927: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:163:
+#define QM_INIT_TX_PQ_MAP(p_hwfn, map, pq_id, vp_pq_id, \
+ rl_valid, rl_id, voq, wrr) \

+       do { \
+       OSAL_MEMSET(&map, 0, sizeof(map)); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_PQ_VALID, 1); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_VALID, rl_valid ? 1 : 0); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_ID, rl_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VP_PQ_ID, vp_pq_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VOQ, voq); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_WRR_WEIGHT_GROUP, wrr); \
+       STORE_RT_REG(p_hwfn, QM_REG_TXPQMAP_RT_OFFSET + pq_id, *((u32 *)&map));\
        } while (0)

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8)
#2929: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:165:
+ do { \
+ OSAL_MEMSET(&map, 0, sizeof(map)); \

total: 0 errors, 1 warnings, 3 checks, 3176 lines checked CHECK:CAMELCASE: Avoid CamelCase: <optionId> #1028: FILE: drivers/net/qede/base/mcp_public.h:1707:
+#define SINGLE_NVM_WR_OP(optionId) \

WARNING:LONG_LINE: line over 80 characters
#1210: FILE: drivers/net/qede/base/nvm_cfg.h:1120:
+ #define
NVM_CFG1_GLOB_WARNING_TEMPERATURE_THRESHOLD_MASK 0x1FE00000

WARNING:LONG_LINE: line over 80 characters #1322: FILE: drivers/net/qede/base/nvm_cfg.h:1229:
+ #define
NVM_CFG1_GLOB_STORM_CLOCK_FREQUENCY_STORM_CLK_DEFAULT 0x0

WARNING:LONG_LINE: line over 80 characters
#1447: FILE: drivers/net/qede/base/nvm_cfg.h:1354:
+ #define
NVM_CFG1_GLOB_NUMBER_OF_PROVISIONED_VF_MAC_MASK 0x00FF0000

WARNING:LONG_LINE: line over 80 characters #1569: FILE: drivers/net/qede/base/nvm_cfg.h:2229:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_25G_BASE_R 0x10

WARNING:LONG_LINE: line over 80 characters #1572: FILE: drivers/net/qede/base/nvm_cfg.h:2232:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_40G_BASE_R 0x80

WARNING:LONG_LINE: line over 80 characters
#1574: FILE: drivers/net/qede/base/nvm_cfg.h:2234:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_50G_BASE_R 0x200

WARNING:LONG_LINE: line over 80 characters #1575: FILE: drivers/net/qede/base/nvm_cfg.h:2235:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_50G_RS528 0x400

WARNING:LONG_LINE: line over 80 characters #1576: FILE: drivers/net/qede/base/nvm_cfg.h:2236:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_50G_RS544 0x800

WARNING:LONG_LINE: line over 80 characters
#1577: FILE: drivers/net/qede/base/nvm_cfg.h:2237:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_100G_NONE 0x1000

WARNING:LONG_LINE: line over 80 characters
#1578: FILE: drivers/net/qede/base/nvm_cfg.h:2238:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_100G_BASE_R 0x2000

WARNING:LONG_LINE: line over 80 characters
#1579: FILE: drivers/net/qede/base/nvm_cfg.h:2239:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_100G_RS528 0x4000

WARNING:LONG_LINE: line over 80 characters
#1580: FILE: drivers/net/qede/base/nvm_cfg.h:2240:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_100G_RS544 0x8000

total: 0 errors, 12 warnings, 1 checks, 2043 lines checked

### net/qede/base: update HSI code

CHECK:CAMELCASE: Avoid CamelCase: <vfId> WARNING:LONG_LINE_COMMENT: line over 80 characters #2913: FILE: drivers/net/qede/base/ecore_iro_values.h:217:
+ /* TSTORM_NVMF_PORT_TASKPOOL_PRODUCER_CONSUMER_OFFSET(port_num_id,taskpool_index),
*/

total: 0 errors, 1 warnings, 2 checks, 2956 lines checked

### net/qede/base: update the FW to 8.40.25.0

CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #433: FILE: drivers/net/qede/base/ecore_cxt.c:633:
+ p_blk = ecore_cxt_set_blk(

CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #461: FILE: drivers/net/qede/base/ecore_cxt.c:688:
+ p_blk = ecore_cxt_set_blk(

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'line == first_skipped_line'
#794: FILE: drivers/net/qede/base/ecore_cxt.c:1018:
+ if (lines_to_skip && (line == first_skipped_line)) {

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'ecore_hw_init_chip', this function's name, in a string #1482: FILE: drivers/net/qede/base/ecore_dev.c:2719:
+ "ecore_hw_init_chip() shouldn't be called in
a non-emulation environment\n");

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pq_size' - possible side-effects? #2348: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:26:
+#define QM_PQ_MEM_4KB(pq_size) \
+ (pq_size ? DIV_ROUND_UP((pq_size + 1) * QM_PQ_ELEMENT_SIZE, 0x1000) : 0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pq_size' - possible side-effects? #2350: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:28:
+#define QM_PQ_SIZE_256B(pq_size) \
+ (pq_size ? DIV_ROUND_UP(pq_size, 0x100) - 1 : 0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rl_id' - possible side-effects? #2410: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:171:
+#define PQ_INFO_ELEMENT(vp_pq_id, pf, tc, port, rl_valid, rl_id) \
+ (((vp_pq_id) << 0) | ((pf) << 12) | ((tc) << 16) | ((port) << 20) | \
+ ((rl_valid ? 1 : 0) << 22) | (((rl_id) & 255) << 24) | \
+ (((rl_id) >> 8) << 9))

CHECK:CAMELCASE: Avoid CamelCase: <pData>
#3106: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:1438:
+ u32 *pData,

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'port' - possible side-effects? #3524: FILE: drivers/net/qede/base/ecore_init_fw_funcs.h:20:
+#define VOQ(port, tc, max_phys_tcs_per_port) \
+ ((tc) == PURE_LB_TC ? NUM_OF_PHYS_TCS * MAX_NUM_PORTS_BB + (port) : \
+ (port) * (max_phys_tcs_per_port) + (tc))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'tc' - possible side-effects? #3524: FILE: drivers/net/qede/base/ecore_init_fw_funcs.h:20:
+#define VOQ(port, tc, max_phys_tcs_per_port) \
+ ((tc) == PURE_LB_TC ? NUM_OF_PHYS_TCS * MAX_NUM

Quoted 54 lines
 drivers/net/qede/base/bcm_osal.c              |    1 +
 drivers/net/qede/base/bcm_osal.h              |    5 +-
 drivers/net/qede/base/common_hsi.h            |  257 +--
 drivers/net/qede/base/ecore.h                 |   77 +-
 drivers/net/qede/base/ecore_chain.h           |   84 +-
 drivers/net/qede/base/ecore_cxt.c             |  520 ++++---
 drivers/net/qede/base/ecore_cxt.h             |   12 +
 drivers/net/qede/base/ecore_dcbx.c            |    7 +-
 drivers/net/qede/base/ecore_dev.c             |  753 +++++----
 drivers/net/qede/base/ecore_dev_api.h         |   92 --
 drivers/net/qede/base/ecore_gtt_reg_addr.h    |   42 +-
 drivers/net/qede/base/ecore_gtt_values.h      |   18 +-
 drivers/net/qede/base/ecore_hsi_common.h      | 1134 +++++++-------
 drivers/net/qede/base/ecore_hsi_debug_tools.h |  475 +++---
 drivers/net/qede/base/ecore_hsi_eth.h         | 1386 ++++++++---------
 drivers/net/qede/base/ecore_hsi_init_func.h   |   25 +-
 drivers/net/qede/base/ecore_hsi_init_tool.h   |   42 +-
 drivers/net/qede/base/ecore_hw.c              |   68 +-
 drivers/net/qede/base/ecore_hw.h              |   98 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c   |  717 ++++-----
 drivers/net/qede/base/ecore_init_fw_funcs.h   |  107 +-
 drivers/net/qede/base/ecore_init_ops.c        |   66 +-
 drivers/net/qede/base/ecore_init_ops.h        |   12 +-
 drivers/net/qede/base/ecore_int.c             |  131 +-
 drivers/net/qede/base/ecore_int.h             |    4 +-
 drivers/net/qede/base/ecore_int_api.h         |   13 +-
 drivers/net/qede/base/ecore_iov_api.h         |    4 +-
 drivers/net/qede/base/ecore_iro.h             |  320 ++--
 drivers/net/qede/base/ecore_iro_values.h      |  336 ++--
 drivers/net/qede/base/ecore_l2.c              |   10 +-
 drivers/net/qede/base/ecore_l2_api.h          |    2 +
 drivers/net/qede/base/ecore_mcp.c             |  296 ++--
 drivers/net/qede/base/ecore_mcp.h             |    9 +-
 drivers/net/qede/base/ecore_proto_if.h        |    1 +
 drivers/net/qede/base/ecore_rt_defs.h         |  870 +++++------
 drivers/net/qede/base/ecore_sp_commands.c     |   15 +-
 drivers/net/qede/base/ecore_spq.c             |   55 +-
 drivers/net/qede/base/ecore_sriov.c           |  178 ++-
 drivers/net/qede/base/ecore_sriov.h           |    4 +-
 drivers/net/qede/base/ecore_vf.c              |   18 +-
 drivers/net/qede/base/eth_common.h            |  101 +-
 drivers/net/qede/base/mcp_public.h            |   59 +-
 drivers/net/qede/base/nvm_cfg.h               |  909 ++++++++++-
 drivers/net/qede/base/reg_addr.h              |   75 +-
 drivers/net/qede/qede_ethdev.c                |   54 +-
 drivers/net/qede/qede_ethdev.h                |   21 +-
 drivers/net/qede/qede_main.c                  |    2 +-
 drivers/net/qede/qede_rxtx.c                  |   28 +-
 48 files changed, 5471 insertions(+), 4042 deletions(-)

--
2.18.0

#11 lore raw

Hi Jerin,

Quoted 28 lines

From: Jerin Jacob <[email protected]>
Sent: Wednesday, October 02, 2019 10:06 PM

Quoted 5 lines · Rasesh Mody

Hi,

This patch series updates the FW to 8.40.25.0 and includes corresponding base driver changes. It also includes some enhancements

and fixes.

Quoted 7 lines

The PMD version is bumped to 2.11.0.1.

Please apply.

Thanks!
-Rasesh

Quoted 10 lines

Rasesh Mody (9):
net/qede/base: calculate right page index for PBL chains net/qede/base: change MFW mailbox command log verbosity net/qede/base: lock entire QM reconfiguration flow net/qede/base: rename HSI datatypes and funcs net/qede/base: update rt defs NVM cfg and mcp code net/qede/base: move dmae code to HSI net/qede/base: update HSI code
net/qede/base: update the FW to 8.40.25.0 net/qede: print adapter info during init failure

Quoted 6 lines

Hi Rasesh,

I understand it is the _base_ code(probably owned by someone else)but there are a lot of checkpatch issues[1] with this patch in base code. Is something can be fixed? if so, please send the next version else let us know.

I've tried to minimize the checkpatch issues as much as possible. However, I think there are few from the remaining that can be fixed like MACRO_ARG_PRECEDENCE. I'll send a v2 to iron these out.
Please note there are some like SUSPECT_CODE_INDENT, OPEN_ENDED_LINE, which are caused when resolving 80 characters long line warnings. There are few LONG_LINE warnings left as is to maintain code readability. UNNECESSARY_PARENTHESES seem to be false positive as parentheses are helpful in this case.

Thanks!
-Rasesh

Quoted 263 lines

[1]
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'map' - possible side- effects?
#2927: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:163:

(quoted diff) +11 -0
+#define QM_INIT_TX_PQ_MAP(p_hwfn, map, pq_id, vp_pq_id, \
+                          rl_valid, rl_id, voq, wrr) \
+       do { \
+       OSAL_MEMSET(&map, 0, sizeof(map)); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_PQ_VALID, 1); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_VALID, rl_valid ? 1 : 0); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_ID, rl_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VP_PQ_ID, vp_pq_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VOQ, voq); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_WRR_WEIGHT_GROUP, wrr); \
+       STORE_RT_REG(p_hwfn, QM_REG_TXPQMAP_RT_OFFSET + pq_id,

*((u32

+*)&map));\
       } while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'map' may be better as '(map)' to avoid precedence issues
#2927: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:163:

(quoted diff) +11 -0
+#define QM_INIT_TX_PQ_MAP(p_hwfn, map, pq_id, vp_pq_id, \
+                          rl_valid, rl_id, voq, wrr) \
+       do { \
+       OSAL_MEMSET(&map, 0, sizeof(map)); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_PQ_VALID, 1); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_VALID, rl_valid ? 1 : 0); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_ID, rl_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VP_PQ_ID, vp_pq_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VOQ, voq); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_WRR_WEIGHT_GROUP, wrr); \
+       STORE_RT_REG(p_hwfn, QM_REG_TXPQMAP_RT_OFFSET + pq_id,

*((u32

+*)&map));\
       } while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'pq_id' may be better as '(pq_id)' to avoid precedence issues
#2927: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:163:

(quoted diff) +11 -0
+#define QM_INIT_TX_PQ_MAP(p_hwfn, map, pq_id, vp_pq_id, \
+                          rl_valid, rl_id, voq, wrr) \
+       do { \
+       OSAL_MEMSET(&map, 0, sizeof(map)); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_PQ_VALID, 1); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_VALID, rl_valid ? 1 : 0); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_RL_ID, rl_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VP_PQ_ID, vp_pq_id); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_VOQ, voq); \
+       SET_FIELD(map.reg, QM_RF_PQ_MAP_WRR_WEIGHT_GROUP, wrr); \
+       STORE_RT_REG(p_hwfn, QM_REG_TXPQMAP_RT_OFFSET + pq_id,

*((u32

+*)&map));\
       } while (0)

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8)
#2929: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:165:

(quoted diff) +2 -0
+       do { \
+       OSAL_MEMSET(&map, 0, sizeof(map)); \

total: 0 errors, 1 warnings, 3 checks, 3176 lines checked CHECK:CAMELCASE: Avoid CamelCase: <optionId> #1028: FILE: drivers/net/qede/base/mcp_public.h:1707:
+#define SINGLE_NVM_WR_OP(optionId) \

WARNING:LONG_LINE: line over 80 characters #1210: FILE: drivers/net/qede/base/nvm_cfg.h:1120:
+ #define
NVM_CFG1_GLOB_WARNING_TEMPERATURE_THRESHOLD_MASK 0x1FE00000

WARNING:LONG_LINE: line over 80 characters #1322: FILE: drivers/net/qede/base/nvm_cfg.h:1229:
+ #define
NVM_CFG1_GLOB_STORM_CLOCK_FREQUENCY_STORM_CLK_DEFAULT 0x0

WARNING:LONG_LINE: line over 80 characters #1447: FILE: drivers/net/qede/base/nvm_cfg.h:1354:
+ #define
NVM_CFG1_GLOB_NUMBER_OF_PROVISIONED_VF_MAC_MASK 0x00FF0000

WARNING:LONG_LINE: line over 80 characters #1569: FILE: drivers/net/qede/base/nvm_cfg.h:2229:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_25G_BASE_R 0x10

WARNING:LONG_LINE: line over 80 characters #1572: FILE: drivers/net/qede/base/nvm_cfg.h:2232:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_40G_BASE_R 0x80

WARNING:LONG_LINE: line over 80 characters
#1574: FILE: drivers/net/qede/base/nvm_cfg.h:2234:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_50G_BASE_R 0x200

WARNING:LONG_LINE: line over 80 characters #1575: FILE: drivers/net/qede/base/nvm_cfg.h:2235:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_50G_RS528 0x400

WARNING:LONG_LINE: line over 80 characters #1576: FILE: drivers/net/qede/base/nvm_cfg.h:2236:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_50G_RS544 0x800

WARNING:LONG_LINE: line over 80 characters
#1577: FILE: drivers/net/qede/base/nvm_cfg.h:2237:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_100G_NONE 0x1000

WARNING:LONG_LINE: line over 80 characters #1578: FILE: drivers/net/qede/base/nvm_cfg.h:2238:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_100G_BASE_R 0x2000

WARNING:LONG_LINE: line over 80 characters
#1579: FILE: drivers/net/qede/base/nvm_cfg.h:2239:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_100G_RS528 0x4000

WARNING:LONG_LINE: line over 80 characters
#1580: FILE: drivers/net/qede/base/nvm_cfg.h:2240:
+ #define
NVM_CFG1_PORT_EXTENDED_FEC_MODE_EXTND_FEC_100G_RS544 0x8000

total: 0 errors, 12 warnings, 1 checks, 2043 lines checked

### net/qede/base: update HSI code

CHECK:CAMELCASE: Avoid CamelCase: <vfId> WARNING:LONG_LINE_COMMENT: line over 80 characters #2913: FILE: drivers/net/qede/base/ecore_iro_values.h:217:

(quoted diff) +2 -0
+       /*
+

TSTORM_NVMF_PORT_TASKPOOL_PRODUCER_CONSUMER_OFFSET(port_n um_id,taskpoo
+ l_index),
*/

total: 0 errors, 1 warnings, 2 checks, 2956 lines checked

### net/qede/base: update the FW to 8.40.25.0

CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #433: FILE: drivers/net/qede/base/ecore_cxt.c:633:
+ p_blk = ecore_cxt_set_blk(

CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #461: FILE: drivers/net/qede/base/ecore_cxt.c:688:
+ p_blk = ecore_cxt_set_blk(

CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'line == first_skipped_line'
#794: FILE: drivers/net/qede/base/ecore_cxt.c:1018:
+ if (lines_to_skip && (line == first_skipped_line)) {

WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'ecore_hw_init_chip', this function's name, in a string #1482: FILE: drivers/net/qede/base/ecore_dev.c:2719:
+ "ecore_hw_init_chip() shouldn't be called in
a non-emulation environment\n");

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pq_size' - possible side- effects?
#2348: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:26:

(quoted diff) +3 -0
+#define QM_PQ_MEM_4KB(pq_size) \
+       (pq_size ? DIV_ROUND_UP((pq_size + 1) * QM_PQ_ELEMENT_SIZE,
+0x1000) : 0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pq_size' - possible side- effects?
#2350: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:28:

(quoted diff) +2 -0
+#define QM_PQ_SIZE_256B(pq_size) \
+       (pq_size ? DIV_ROUND_UP(pq_size, 0x100) - 1 : 0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rl_id' - possible side- effects?
#2410: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:171:

(quoted diff) +4 -0
+#define PQ_INFO_ELEMENT(vp_pq_id, pf, tc, port, rl_valid, rl_id) \
+       (((vp_pq_id) << 0) | ((pf) << 12) | ((tc) << 16) | ((port) << 20) | \
+        ((rl_valid ? 1 : 0) << 22) | (((rl_id) & 255) << 24) | \
+        (((rl_id) >> 8) << 9))

CHECK:CAMELCASE: Avoid CamelCase: <pData>
#3106: FILE: drivers/net/qede/base/ecore_init_fw_funcs.c:1438:
+ u32 *pData,

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'port' - possible side- effects?
#3524: FILE: drivers/net/qede/base/ecore_init_fw_funcs.h:20:

(quoted diff) +2 -0
+#define VOQ(port, tc, max_phys_tcs_per_port) \
+       ((tc) == PURE_LB_TC ? NUM_OF_PHYS_TCS * MAX_NUM_PORTS_BB +

(port) : \
+ (port) * (max_phys_tcs_per_port) + (tc))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'tc' - possible side- effects?
#3524: FILE: drivers/net/qede/base/ecore_init_fw_funcs.h:20:

(quoted diff) +2 -0
+#define VOQ(port, tc, max_phys_tcs_per_port) \
+       ((tc) == PURE_LB_TC ? NUM_OF_PHYS_TCS * MAX_NUM
Quoted 58 lines




 drivers/net/qede/base/bcm_osal.c              |    1 +
 drivers/net/qede/base/bcm_osal.h              |    5 +-
 drivers/net/qede/base/common_hsi.h            |  257 +--
 drivers/net/qede/base/ecore.h                 |   77 +-
 drivers/net/qede/base/ecore_chain.h           |   84 +-
 drivers/net/qede/base/ecore_cxt.c             |  520 ++++---
 drivers/net/qede/base/ecore_cxt.h             |   12 +
 drivers/net/qede/base/ecore_dcbx.c            |    7 +-
 drivers/net/qede/base/ecore_dev.c             |  753 +++++----
 drivers/net/qede/base/ecore_dev_api.h         |   92 --
 drivers/net/qede/base/ecore_gtt_reg_addr.h    |   42 +-
 drivers/net/qede/base/ecore_gtt_values.h      |   18 +-
 drivers/net/qede/base/ecore_hsi_common.h      | 1134 +++++++-------
 drivers/net/qede/base/ecore_hsi_debug_tools.h |  475 +++---
 drivers/net/qede/base/ecore_hsi_eth.h         | 1386 ++++++++---------
 drivers/net/qede/base/ecore_hsi_init_func.h   |   25 +-
 drivers/net/qede/base/ecore_hsi_init_tool.h   |   42 +-
 drivers/net/qede/base/ecore_hw.c              |   68 +-
 drivers/net/qede/base/ecore_hw.h              |   98 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c   |  717 ++++-----
 drivers/net/qede/base/ecore_init_fw_funcs.h   |  107 +-
 drivers/net/qede/base/ecore_init_ops.c        |   66 +-
 drivers/net/qede/base/ecore_init_ops.h        |   12 +-
 drivers/net/qede/base/ecore_int.c             |  131 +-
 drivers/net/qede/base/ecore_int.h             |    4 +-
 drivers/net/qede/base/ecore_int_api.h         |   13 +-
 drivers/net/qede/base/ecore_iov_api.h         |    4 +-
 drivers/net/qede/base/ecore_iro.h             |  320 ++--
 drivers/net/qede/base/ecore_iro_values.h      |  336 ++--
 drivers/net/qede/base/ecore_l2.c              |   10 +-
 drivers/net/qede/base/ecore_l2_api.h          |    2 +
 drivers/net/qede/base/ecore_mcp.c             |  296 ++--
 drivers/net/qede/base/ecore_mcp.h             |    9 +-
 drivers/net/qede/base/ecore_proto_if.h        |    1 +
 drivers/net/qede/base/ecore_rt_defs.h         |  870 +++++------
 drivers/net/qede/base/ecore_sp_commands.c     |   15 +-
 drivers/net/qede/base/ecore_spq.c             |   55 +-
 drivers/net/qede/base/ecore_sriov.c           |  178 ++-
 drivers/net/qede/base/ecore_sriov.h           |    4 +-
 drivers/net/qede/base/ecore_vf.c              |   18 +-
 drivers/net/qede/base/eth_common.h            |  101 +-
 drivers/net/qede/base/mcp_public.h            |   59 +-
 drivers/net/qede/base/nvm_cfg.h               |  909 ++++++++++-
 drivers/net/qede/base/reg_addr.h              |   75 +-
 drivers/net/qede/qede_ethdev.c                |   54 +-
 drivers/net/qede/qede_ethdev.h                |   21 +-
 drivers/net/qede/qede_main.c                  |    2 +-
 drivers/net/qede/qede_rxtx.c                  |   28 +-
 48 files changed, 5471 insertions(+), 4042 deletions(-)

--
2.18.0

#12 lore raw

PATCH v2 1/9 net/qede/base: calculate right page index for PBL chains

In reply to Rasesh Mody

ecore_chain_set_prod/cons() sets the wrong page index in chains with non-power of 2 page count. Fix ecore_chain_set_prod/cons() for PBL chains with non power of 2 page count.
Calculate the right page index according to current indexes.

---
 drivers/net/qede/base/ecore_chain.h | 84 ++++++++++++++++++++---------
 1 file changed, 58 insertions(+), 26 deletions(-)
drivers/net/qede/base/ecore_chain.h +58 -26
index 6d0382d3a..c69920be5 100644
@@ -86,8 +86,8 @@ struct ecore_chain {
 		void		**pp_virt_addr_tbl;
 
 		union {
-			struct ecore_chain_pbl_u16	u16;
-			struct ecore_chain_pbl_u32	u32;
+			struct ecore_chain_pbl_u16	pbl_u16;
+			struct ecore_chain_pbl_u32	pbl_u32;
 		} c;
 	} pbl;
 
@@ -405,7 +405,7 @@ static OSAL_INLINE void *ecore_chain_produce(struct ecore_chain *p_chain)
 		if ((p_chain->u.chain16.prod_idx &
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_prod_idx = &p_chain->u.chain16.prod_idx;
-			p_prod_page_idx = &p_chain->pbl.c.u16.prod_page_idx;
+			p_prod_page_idx = &p_chain->pbl.c.pbl_u16.prod_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_prod_elem,
 						 p_prod_idx, p_prod_page_idx);
 		}
@@ -414,7 +414,7 @@ static OSAL_INLINE void *ecore_chain_produce(struct ecore_chain *p_chain)
 		if ((p_chain->u.chain32.prod_idx &
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_prod_idx = &p_chain->u.chain32.prod_idx;
-			p_prod_page_idx = &p_chain->pbl.c.u32.prod_page_idx;
+			p_prod_page_idx = &p_chain->pbl.c.pbl_u32.prod_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_prod_elem,
 						 p_prod_idx, p_prod_page_idx);
 		}
@@ -479,7 +479,7 @@ static OSAL_INLINE void *ecore_chain_consume(struct ecore_chain *p_chain)
 		if ((p_chain->u.chain16.cons_idx &
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_cons_idx = &p_chain->u.chain16.cons_idx;
-			p_cons_page_idx = &p_chain->pbl.c.u16.cons_page_idx;
+			p_cons_page_idx = &p_chain->pbl.c.pbl_u16.cons_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_cons_elem,
 						 p_cons_idx, p_cons_page_idx);
 		}
@@ -488,7 +488,7 @@ static OSAL_INLINE void *ecore_chain_consume(struct ecore_chain *p_chain)
 		if ((p_chain->u.chain32.cons_idx &
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_cons_idx = &p_chain->u.chain32.cons_idx;
-			p_cons_page_idx = &p_chain->pbl.c.u32.cons_page_idx;
+			p_cons_page_idx = &p_chain->pbl.c.pbl_u32.cons_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_cons_elem,
 						 p_cons_idx, p_cons_page_idx);
 		}
@@ -532,11 +532,11 @@ static OSAL_INLINE void ecore_chain_reset(struct ecore_chain *p_chain)
 		u32 reset_val = p_chain->page_cnt - 1;
 
 		if (is_chain_u16(p_chain)) {
-			p_chain->pbl.c.u16.prod_page_idx = (u16)reset_val;
-			p_chain->pbl.c.u16.cons_page_idx = (u16)reset_val;
+			p_chain->pbl.c.pbl_u16.prod_page_idx = (u16)reset_val;
+			p_chain->pbl.c.pbl_u16.cons_page_idx = (u16)reset_val;
 		} else {
-			p_chain->pbl.c.u32.prod_page_idx = reset_val;
-			p_chain->pbl.c.u32.cons_page_idx = reset_val;
+			p_chain->pbl.c.pbl_u32.prod_page_idx = reset_val;
+			p_chain->pbl.c.pbl_u32.cons_page_idx = reset_val;
 		}
 	}
 
@@ -725,18 +725,34 @@ static OSAL_INLINE void ecore_chain_set_prod(struct ecore_chain *p_chain,
 					     u32 prod_idx, void *p_prod_elem)
 {
 	if (p_chain->mode == ECORE_CHAIN_MODE_PBL) {
-		/* Use "prod_idx-1" since ecore_chain_produce() advances the
-		 * page index before the producer index when getting to
-		 * "next_page_mask".
+		u32 cur_prod, page_mask, page_cnt, page_diff;
+
+		cur_prod = is_chain_u16(p_chain) ? p_chain->u.chain16.prod_idx
+						 : p_chain->u.chain32.prod_idx;
+
+		/* Assume that number of elements in a page is power of 2 */
+		page_mask = ~p_chain->elem_per_page_mask;
+
+		/* Use "cur_prod - 1" and "prod_idx - 1" since producer index
+		 * reaches the first element of next page before the page index
+		 * is incremented. See ecore_chain_produce().
+		 * Index wrap around is not a problem because the difference
+		 * between current and given producer indexes is always
+		 * positive and lower than the chain's capacity.
 		 */
-		u32 elem_idx =
-			(prod_idx - 1 + p_chain->capacity) % p_chain->capacity;
-		u32 page_idx = elem_idx / p_chain->elem_per_page;
+		page_diff = (((cur_prod - 1) & page_mask) -
+			     ((prod_idx - 1) & page_mask)) /
+			    p_chain->elem_per_page;
 
+		page_cnt = ecore_chain_get_page_cnt(p_chain);
 		if (is_chain_u16(p_chain))
-			p_chain->pbl.c.u16.prod_page_idx = (u16)page_idx;
+			p_chain->pbl.c.pbl_u16.prod_page_idx =
+				(p_chain->pbl.c.pbl_u16.prod_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 		else
-			p_chain->pbl.c.u32.prod_page_idx = page_idx;
+			p_chain->pbl.c.pbl_u32.prod_page_idx =
+				(p_chain->pbl.c.pbl_u32.prod_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 	}
 
 	if (is_chain_u16(p_chain))
@@ -756,18 +772,34 @@ static OSAL_INLINE void ecore_chain_set_cons(struct ecore_chain *p_chain,
 					     u32 cons_idx, void *p_cons_elem)
 {
 	if (p_chain->mode == ECORE_CHAIN_MODE_PBL) {
-		/* Use "cons_idx-1" since ecore_chain_consume() advances the
-		 * page index before the consumer index when getting to
-		 * "next_page_mask".
+		u32 cur_cons, page_mask, page_cnt, page_diff;
+
+		cur_cons = is_chain_u16(p_chain) ? p_chain->u.chain16.cons_idx
+						 : p_chain->u.chain32.cons_idx;
+
+		/* Assume that number of elements in a page is power of 2 */
+		page_mask = ~p_chain->elem_per_page_mask;
+
+		/* Use "cur_cons - 1" and "cons_idx - 1" since consumer index
+		 * reaches the first element of next page before the page index
+		 * is incremented. See ecore_chain_consume().
+		 * Index wrap around is not a problem because the difference
+		 * between current and given consumer indexes is always
+		 * positive and lower than the chain's capacity.
 		 */
-		u32 elem_idx =
-			(cons_idx - 1 + p_chain->capacity) % p_chain->capacity;
-		u32 page_idx = elem_idx / p_chain->elem_per_page;
+		page_diff = (((cur_cons - 1) & page_mask) -
+			     ((cons_idx - 1) & page_mask)) /
+			    p_chain->elem_per_page;
 
+		page_cnt = ecore_chain_get_page_cnt(p_chain);
 		if (is_chain_u16(p_chain))
-			p_chain->pbl.c.u16.cons_page_idx = (u16)page_idx;
+			p_chain->pbl.c.pbl_u16.cons_page_idx =
+				(p_chain->pbl.c.pbl_u16.cons_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 		else
-			p_chain->pbl.c.u32.cons_page_idx = page_idx;
+			p_chain->pbl.c.pbl_u32.cons_page_idx =
+				(p_chain->pbl.c.pbl_u32.cons_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 	}
 
 	if (is_chain_u16(p_chain))
Signature · 1 line
2.18.0
#13 lore raw

PATCH v2 2/9 net/qede/base: change MFW mailbox command log verbosity

In reply to Rasesh Mody

Change management FW mailboxes DP_VERBOSE module to ECORE_MSG_HW

---
 drivers/net/qede/base/ecore_mcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/qede/base/ecore_mcp.c +2 -2
index 6c6560688..1a5152ec5 100644
@@ -469,7 +469,7 @@ static void __ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn,
 	/* Set the drv command along with the sequence number */
 	DRV_MB_WR(p_hwfn, p_ptt, drv_mb_header, (p_mb_params->cmd | seq_num));
 
-	DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
+	DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
 		   "MFW mailbox: command 0x%08x param 0x%08x\n",
 		   (p_mb_params->cmd | seq_num), p_mb_params->param);
 }
@@ -594,7 +594,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
 	ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
 	OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock);
 
-	DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
+	DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
 		   "MFW mailbox: response 0x%08x param 0x%08x [after %d.%03d ms]\n",
 		   p_mb_params->mcp_resp, p_mb_params->mcp_param,
 		   (cnt * delay) / 1000, (cnt * delay) % 1000);
Signature · 1 line
2.18.0
#14 lore raw

v2 cover net/qede/base: update FW to 8.40.25.0

In reply to Rasesh Mody

Hi,

This patch series updates the FW to 8.40.25.0 and includes corresponding base driver changes. It also includes some enhancements and fixes. The PMD version is bumped to 2.11.0.1.

v2:
Addressed checkpatch issues
9/9 - print adapter info for any failure (not just probe) during init

Thanks!
-Rasesh

Rasesh Mody (9):
net/qede/base: calculate right page index for PBL chains net/qede/base: change MFW mailbox command log verbosity net/qede/base: lock entire QM reconfiguration flow net/qede/base: rename HSI datatypes and funcs net/qede/base: update rt defs NVM cfg and mcp code net/qede/base: move dmae code to HSI net/qede/base: update HSI code
net/qede/base: update the FW to 8.40.25.0 net/qede: print adapter info during init failure

 drivers/net/qede/base/bcm_osal.c              |    1 +
 drivers/net/qede/base/bcm_osal.h              |    5 +-
 drivers/net/qede/base/common_hsi.h            |  257 +--
 drivers/net/qede/base/ecore.h                 |   77 +-
 drivers/net/qede/base/ecore_chain.h           |   84 +-
 drivers/net/qede/base/ecore_cxt.c             |  520 ++++---
 drivers/net/qede/base/ecore_cxt.h             |   12 +
 drivers/net/qede/base/ecore_dcbx.c            |    7 +-
 drivers/net/qede/base/ecore_dev.c             |  753 +++++----
 drivers/net/qede/base/ecore_dev_api.h         |   92 --
 drivers/net/qede/base/ecore_gtt_reg_addr.h    |   42 +-
 drivers/net/qede/base/ecore_gtt_values.h      |   18 +-
 drivers/net/qede/base/ecore_hsi_common.h      | 1134 +++++++-------
 drivers/net/qede/base/ecore_hsi_debug_tools.h |  475 +++---
 drivers/net/qede/base/ecore_hsi_eth.h         | 1386 ++++++++---------
 drivers/net/qede/base/ecore_hsi_init_func.h   |   25 +-
 drivers/net/qede/base/ecore_hsi_init_tool.h   |   42 +-
 drivers/net/qede/base/ecore_hw.c              |   68 +-
 drivers/net/qede/base/ecore_hw.h              |   98 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c   |  718 ++++-----
 drivers/net/qede/base/ecore_init_fw_funcs.h   |  107 +-
 drivers/net/qede/base/ecore_init_ops.c        |   66 +-
 drivers/net/qede/base/ecore_init_ops.h        |   12 +-
 drivers/net/qede/base/ecore_int.c             |  131 +-
 drivers/net/qede/base/ecore_int.h             |    4 +-
 drivers/net/qede/base/ecore_int_api.h         |   13 +-
 drivers/net/qede/base/ecore_iov_api.h         |    4 +-
 drivers/net/qede/base/ecore_iro.h             |  320 ++--
 drivers/net/qede/base/ecore_iro_values.h      |  336 ++--
 drivers/net/qede/base/ecore_l2.c              |   10 +-
 drivers/net/qede/base/ecore_l2_api.h          |    2 +
 drivers/net/qede/base/ecore_mcp.c             |  296 ++--
 drivers/net/qede/base/ecore_mcp.h             |    9 +-
 drivers/net/qede/base/ecore_proto_if.h        |    1 +
 drivers/net/qede/base/ecore_rt_defs.h         |  870 +++++------
 drivers/net/qede/base/ecore_sp_commands.c     |   15 +-
 drivers/net/qede/base/ecore_spq.c             |   55 +-
 drivers/net/qede/base/ecore_sriov.c           |  178 ++-
 drivers/net/qede/base/ecore_sriov.h           |    4 +-
 drivers/net/qede/base/ecore_vf.c              |   18 +-
 drivers/net/qede/base/eth_common.h            |  101 +-
 drivers/net/qede/base/mcp_public.h            |   59 +-
 drivers/net/qede/base/nvm_cfg.h               |  909 ++++++++++-
 drivers/net/qede/base/reg_addr.h              |   75 +-
 drivers/net/qede/qede_ethdev.c                |   81 +-
 drivers/net/qede/qede_ethdev.h                |   21 +-
 drivers/net/qede/qede_main.c                  |    2 +-
 drivers/net/qede/qede_rxtx.c                  |   28 +-
 48 files changed, 5493 insertions(+), 4048 deletions(-)
Signature · 1 line
2.18.0
#15 lore raw
Quoted 7 lines · Rasesh Mody

Hi,

This patch series updates the FW to 8.40.25.0 and includes corresponding base driver changes. It also includes some enhancements and fixes. The PMD version is bumped to 2.11.0.1.

Quoted 6 lines

v2:
Addressed checkpatch issues
9/9 - print adapter info for any failure (not just probe) during init

Thanks!
-Rasesh

Series applied to dpdk-next-net-mrvl/master. Thanks.

Quoted 65 lines

Rasesh Mody (9):
net/qede/base: calculate right page index for PBL chains net/qede/base: change MFW mailbox command log verbosity net/qede/base: lock entire QM reconfiguration flow net/qede/base: rename HSI datatypes and funcs net/qede/base: update rt defs NVM cfg and mcp code net/qede/base: move dmae code to HSI net/qede/base: update HSI code
net/qede/base: update the FW to 8.40.25.0 net/qede: print adapter info during init failure

 drivers/net/qede/base/bcm_osal.c              |    1 +
 drivers/net/qede/base/bcm_osal.h              |    5 +-
 drivers/net/qede/base/common_hsi.h            |  257 +--
 drivers/net/qede/base/ecore.h                 |   77 +-
 drivers/net/qede/base/ecore_chain.h           |   84 +-
 drivers/net/qede/base/ecore_cxt.c             |  520 ++++---
 drivers/net/qede/base/ecore_cxt.h             |   12 +
 drivers/net/qede/base/ecore_dcbx.c            |    7 +-
 drivers/net/qede/base/ecore_dev.c             |  753 +++++----
 drivers/net/qede/base/ecore_dev_api.h         |   92 --
 drivers/net/qede/base/ecore_gtt_reg_addr.h    |   42 +-
 drivers/net/qede/base/ecore_gtt_values.h      |   18 +-
 drivers/net/qede/base/ecore_hsi_common.h      | 1134 +++++++-------
 drivers/net/qede/base/ecore_hsi_debug_tools.h |  475 +++---
 drivers/net/qede/base/ecore_hsi_eth.h         | 1386 ++++++++---------
 drivers/net/qede/base/ecore_hsi_init_func.h   |   25 +-
 drivers/net/qede/base/ecore_hsi_init_tool.h   |   42 +-
 drivers/net/qede/base/ecore_hw.c              |   68 +-
 drivers/net/qede/base/ecore_hw.h              |   98 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c   |  718 ++++-----
 drivers/net/qede/base/ecore_init_fw_funcs.h   |  107 +-
 drivers/net/qede/base/ecore_init_ops.c        |   66 +-
 drivers/net/qede/base/ecore_init_ops.h        |   12 +-
 drivers/net/qede/base/ecore_int.c             |  131 +-
 drivers/net/qede/base/ecore_int.h             |    4 +-
 drivers/net/qede/base/ecore_int_api.h         |   13 +-
 drivers/net/qede/base/ecore_iov_api.h         |    4 +-
 drivers/net/qede/base/ecore_iro.h             |  320 ++--
 drivers/net/qede/base/ecore_iro_values.h      |  336 ++--
 drivers/net/qede/base/ecore_l2.c              |   10 +-
 drivers/net/qede/base/ecore_l2_api.h          |    2 +
 drivers/net/qede/base/ecore_mcp.c             |  296 ++--
 drivers/net/qede/base/ecore_mcp.h             |    9 +-
 drivers/net/qede/base/ecore_proto_if.h        |    1 +
 drivers/net/qede/base/ecore_rt_defs.h         |  870 +++++------
 drivers/net/qede/base/ecore_sp_commands.c     |   15 +-
 drivers/net/qede/base/ecore_spq.c             |   55 +-
 drivers/net/qede/base/ecore_sriov.c           |  178 ++-
 drivers/net/qede/base/ecore_sriov.h           |    4 +-
 drivers/net/qede/base/ecore_vf.c              |   18 +-
 drivers/net/qede/base/eth_common.h            |  101 +-
 drivers/net/qede/base/mcp_public.h            |   59 +-
 drivers/net/qede/base/nvm_cfg.h               |  909 ++++++++++-
 drivers/net/qede/base/reg_addr.h              |   75 +-
 drivers/net/qede/qede_ethdev.c                |   81 +-
 drivers/net/qede/qede_ethdev.h                |   21 +-
 drivers/net/qede/qede_main.c                  |    2 +-
 drivers/net/qede/qede_rxtx.c                  |   28 +-
 48 files changed, 5493 insertions(+), 4048 deletions(-)

--
2.18.0

#16 lore raw

PATCH v2 3/9 net/qede/base: lock entire QM reconfiguration flow

In reply to Rasesh Mody

Multiple flows can issue QM reconfiguration, hence hold the lock longer to account for entire duration of reconfiguration flow.

---
 drivers/net/qede/base/ecore_dev.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
drivers/net/qede/base/ecore_dev.c +13 -11
index d7e1d7b32..b183519b5 100644
@@ -2291,18 +2291,21 @@ enum _ecore_status_t ecore_qm_reconf(struct ecore_hwfn *p_hwfn,
 {
 	struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
 	bool b_rc;
-	enum _ecore_status_t rc;
+	enum _ecore_status_t rc = ECORE_SUCCESS;
+
+	/* multiple flows can issue qm reconf. Need to lock */
+	OSAL_SPIN_LOCK(&qm_lock);
 
 	/* initialize ecore's qm data structure */
 	ecore_init_qm_info(p_hwfn);
 
 	/* stop PF's qm queues */
-	OSAL_SPIN_LOCK(&qm_lock);
 	b_rc = ecore_send_qm_stop_cmd(p_hwfn, p_ptt, false, true,
 				      qm_info->start_pq, qm_info->num_pqs);
-	OSAL_SPIN_UNLOCK(&qm_lock);
-	if (!b_rc)
-		return ECORE_INVAL;
+	if (!b_rc) {
+		rc = ECORE_INVAL;
+		goto unlock;
+	}
 
 	/* clear the QM_PF runtime phase leftovers from previous init */
 	ecore_init_clear_rt_data(p_hwfn);
@@ -2313,18 +2316,17 @@ enum _ecore_status_t ecore_qm_reconf(struct ecore_hwfn *p_hwfn,
 	/* activate init tool on runtime array */
 	rc = ecore_init_run(p_hwfn, p_ptt, PHASE_QM_PF, p_hwfn->rel_pf_id,
 			    p_hwfn->hw_info.hw_mode);
-	if (rc != ECORE_SUCCESS)
-		return rc;
 
 	/* start PF's qm queues */
-	OSAL_SPIN_LOCK(&qm_lock);
 	b_rc = ecore_send_qm_stop_cmd(p_hwfn, p_ptt, true, true,
 				      qm_info->start_pq, qm_info->num_pqs);
-	OSAL_SPIN_UNLOCK(&qm_lock);
 	if (!b_rc)
-		return ECORE_INVAL;
+		rc = ECORE_INVAL;
 
-	return ECORE_SUCCESS;
+unlock:
+	OSAL_SPIN_UNLOCK(&qm_lock);
+
+	return rc;
 }
 
 static enum _ecore_status_t ecore_alloc_qm_data(struct ecore_hwfn *p_hwfn)
Signature · 1 line
2.18.0
#17 lore raw

PATCH v2 4/9 net/qede/base: rename HSI datatypes and funcs

In reply to Rasesh Mody

This patch changes code with E4/E5/e4/e5/BB_K2 prefixes and suffixes.
- HSI datatypes renaming - removed all e5 datatypes and renamed all e4 datatypes to be prefix less/suffix less. (s/_E4//; s/_e4//; s/E4_//).
- HSI functions - removed e4/e5 prefixes/suffixes.

---
 drivers/net/qede/base/common_hsi.h          |   93 +-
 drivers/net/qede/base/ecore_cxt.c           |    4 +-
 drivers/net/qede/base/ecore_dcbx.c          |    2 +-
 drivers/net/qede/base/ecore_dev.c           |  116 +-
 drivers/net/qede/base/ecore_hsi_common.h    |  847 +++++-------
 drivers/net/qede/base/ecore_hsi_eth.h       | 1308 ++++++++-----------
 drivers/net/qede/base/ecore_hsi_init_tool.h |    4 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c |   42 +-
 drivers/net/qede/base/ecore_int.c           |    8 +-
 drivers/net/qede/base/ecore_int.h           |    4 +-
 drivers/net/qede/base/ecore_int_api.h       |    6 +-
 drivers/net/qede/base/ecore_iov_api.h       |    4 +-
 drivers/net/qede/base/ecore_mcp.c           |    4 +-
 drivers/net/qede/base/ecore_spq.c           |    8 +-
 drivers/net/qede/base/ecore_sriov.c         |    4 +-
 drivers/net/qede/base/ecore_sriov.h         |    4 +-
 drivers/net/qede/base/reg_addr.h            |   65 +-
 drivers/net/qede/qede_rxtx.c                |    8 +-
 18 files changed, 1077 insertions(+), 1454 deletions(-)
drivers/net/qede/base/common_hsi.h +26 -67
index 7047eb9f8..b878a92aa 100644
@@ -106,59 +106,43 @@
 /* PCI functions */
 #define MAX_NUM_PORTS_BB        (2)
 #define MAX_NUM_PORTS_K2        (4)
-#define MAX_NUM_PORTS_E5        (4)
-#define MAX_NUM_PORTS           (MAX_NUM_PORTS_E5)
+#define MAX_NUM_PORTS           (MAX_NUM_PORTS_K2)
 
 #define MAX_NUM_PFS_BB          (8)
 #define MAX_NUM_PFS_K2          (16)
-#define MAX_NUM_PFS_E5          (16)
-#define MAX_NUM_PFS             (MAX_NUM_PFS_E5)
+#define MAX_NUM_PFS             (MAX_NUM_PFS_K2)
 #define MAX_NUM_OF_PFS_IN_CHIP  (16) /* On both engines */
 
 #define MAX_NUM_VFS_BB          (120)
 #define MAX_NUM_VFS_K2          (192)
-#define MAX_NUM_VFS_E4          (MAX_NUM_VFS_K2)
-#define MAX_NUM_VFS_E5          (240)
-#define COMMON_MAX_NUM_VFS      (MAX_NUM_VFS_E5)
+#define COMMON_MAX_NUM_VFS      (MAX_NUM_VFS_K2)
 
 #define MAX_NUM_FUNCTIONS_BB    (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB)
 #define MAX_NUM_FUNCTIONS_K2    (MAX_NUM_PFS_K2 + MAX_NUM_VFS_K2)
-#define MAX_NUM_FUNCTIONS       (MAX_NUM_PFS + MAX_NUM_VFS_E4)
 
 /* in both BB and K2, the VF number starts from 16. so for arrays containing all
  * possible PFs and VFs - we need a constant for this size
  */
 #define MAX_FUNCTION_NUMBER_BB      (MAX_NUM_PFS + MAX_NUM_VFS_BB)
 #define MAX_FUNCTION_NUMBER_K2      (MAX_NUM_PFS + MAX_NUM_VFS_K2)
-#define MAX_FUNCTION_NUMBER_E4      (MAX_NUM_PFS + MAX_NUM_VFS_E4)
-#define MAX_FUNCTION_NUMBER_E5      (MAX_NUM_PFS + MAX_NUM_VFS_E5)
-#define COMMON_MAX_FUNCTION_NUMBER  (MAX_NUM_PFS + MAX_NUM_VFS_E5)
+#define COMMON_MAX_FUNCTION_NUMBER  (MAX_NUM_PFS + MAX_NUM_VFS_K2)
 
 #define MAX_NUM_VPORTS_K2       (208)
 #define MAX_NUM_VPORTS_BB       (160)
-#define MAX_NUM_VPORTS_E4       (MAX_NUM_VPORTS_K2)
-#define MAX_NUM_VPORTS_E5       (256)
-#define COMMON_MAX_NUM_VPORTS   (MAX_NUM_VPORTS_E5)
+#define COMMON_MAX_NUM_VPORTS   (MAX_NUM_VPORTS_K2)
 
 #define MAX_NUM_L2_QUEUES_BB	(256)
 #define MAX_NUM_L2_QUEUES_K2    (320)
-#define MAX_NUM_L2_QUEUES_E5    (320) /* TODO_E5_VITALY - fix to 512 */
-#define MAX_NUM_L2_QUEUES		(MAX_NUM_L2_QUEUES_E5)
 
 /* Traffic classes in network-facing blocks (PBF, BTB, NIG, BRB, PRS and QM) */
 #define NUM_PHYS_TCS_4PORT_K2     4
-#define NUM_PHYS_TCS_4PORT_TX_E5  6
-#define NUM_PHYS_TCS_4PORT_RX_E5  4
 #define NUM_OF_PHYS_TCS           8
 #define PURE_LB_TC                NUM_OF_PHYS_TCS
 #define NUM_TCS_4PORT_K2          (NUM_PHYS_TCS_4PORT_K2 + 1)
-#define NUM_TCS_4PORT_TX_E5       (NUM_PHYS_TCS_4PORT_TX_E5 + 1)
-#define NUM_TCS_4PORT_RX_E5       (NUM_PHYS_TCS_4PORT_RX_E5 + 1)
 #define NUM_OF_TCS                (NUM_OF_PHYS_TCS + 1)
 
 /* CIDs */
-#define NUM_OF_CONNECTION_TYPES_E4 (8)
-#define NUM_OF_CONNECTION_TYPES_E5 (16)
+#define NUM_OF_CONNECTION_TYPES (8)
 #define NUM_OF_TASK_TYPES       (8)
 #define NUM_OF_LCIDS            (320)
 #define NUM_OF_LTIDS            (320)
@@ -412,9 +396,8 @@
 #define CAU_FSM_ETH_TX  1
 
 /* Number of Protocol Indices per Status Block */
-#define PIS_PER_SB_E4    12
-#define PIS_PER_SB_E5    8
-#define MAX_PIS_PER_SB_E4	 OSAL_MAX_T(PIS_PER_SB_E4, PIS_PER_SB_E5)
+#define PIS_PER_SB    12
+#define MAX_PIS_PER_SB	 PIS_PER_SB
 
 /* fsm is stopped or not valid for this sb */
 #define CAU_HC_STOPPED_STATE		3
@@ -430,8 +413,7 @@
 
 #define MAX_SB_PER_PATH_K2			(368)
 #define MAX_SB_PER_PATH_BB			(288)
-#define MAX_SB_PER_PATH_E5			(512)
-#define MAX_TOT_SB_PER_PATH			MAX_SB_PER_PATH_E5
+#define MAX_TOT_SB_PER_PATH			MAX_SB_PER_PATH_K2
 
 #define MAX_SB_PER_PF_MIMD			129
 #define MAX_SB_PER_PF_SIMD			64
@@ -639,12 +621,8 @@
 #define MAX_NUM_ILT_RECORDS \
 	OSAL_MAX_T(PXP_NUM_ILT_RECORDS_BB, PXP_NUM_ILT_RECORDS_K2)
 
-#define PXP_NUM_ILT_RECORDS_E5 13664
-
-
 // Host Interface
-#define PXP_QUEUES_ZONE_MAX_NUM_E4	320
-#define PXP_QUEUES_ZONE_MAX_NUM_E5	512
+#define PXP_QUEUES_ZONE_MAX_NUM	320
 
 
 /*****************/
@@ -691,11 +669,12 @@
 /* PBF CONSTANTS  */
 /******************/
 
-/* Number of PBF command queue lines. Each line is 32B. */
-#define PBF_MAX_CMD_LINES_E4 3328
-#define PBF_MAX_CMD_LINES_E5 5280
+/* Number of PBF command queue lines. */
+#define PBF_MAX_CMD_LINES 3328 /* Each line is 256b */
 
 /* Number of BTB blocks. Each block is 256B. */
+#define BTB_MAX_BLOCKS_BB 1440 /* 2880 blocks of 128B */
+#define BTB_MAX_BLOCKS_K2 1840 /* 3680 blocks of 128B */
 #define BTB_MAX_BLOCKS 1440
 
 /*****************/
@@ -1435,40 +1414,20 @@ enum rss_hash_type {
 /*
  * status block structure
  */
-struct status_block_e4 {
-	__le16 pi_array[PIS_PER_SB_E4];
-	__le32 sb_num;
-#define STATUS_BLOCK_E4_SB_NUM_MASK      0x1FF
-#define STATUS_BLOCK_E4_SB_NUM_SHIFT     0
-#define STATUS_BLOCK_E4_ZERO_PAD_MASK    0x7F
-#define STATUS_BLOCK_E4_ZERO_PAD_SHIFT   9
-#define STATUS_BLOCK_E4_ZERO_PAD2_MASK   0xFFFF
-#define STATUS_BLOCK_E4_ZERO_PAD2_SHIFT  16
-	__le32 prod_index;
-#define STATUS_BLOCK_E4_PROD_INDEX_MASK  0xFFFFFF
-#define STATUS_BLOCK_E4_PROD_INDEX_SHIFT 0
-#define STATUS_BLOCK_E4_ZERO_PAD3_MASK   0xFF
-#define STATUS_BLOCK_E4_ZERO_PAD3_SHIFT  24
-};
-
-
-/*
- * status block structure
- */
-struct status_block_e5 {
-	__le16 pi_array[PIS_PER_SB_E5];
+struct status_block {
+	__le16 pi_array[PIS_PER_SB];
 	__le32 sb_num;
-#define STATUS_BLOCK_E5_SB_NUM_MASK      0x1FF
-#define STATUS_BLOCK_E5_SB_NUM_SHIFT     0
-#define STATUS_BLOCK_E5_ZERO_PAD_MASK    0x7F
-#define STATUS_BLOCK_E5_ZERO_PAD_SHIFT   9
-#define STATUS_BLOCK_E5_ZERO_PAD2_MASK   0xFFFF
-#define STATUS_BLOCK_E5_ZERO_PAD2_SHIFT  16
+#define STATUS_BLOCK_SB_NUM_MASK      0x1FF
+#define STATUS_BLOCK_SB_NUM_SHIFT     0
+#define STATUS_BLOCK_ZERO_PAD_MASK    0x7F
+#define STATUS_BLOCK_ZERO_PAD_SHIFT   9
+#define STATUS_BLOCK_ZERO_PAD2_MASK   0xFFFF
+#define STATUS_BLOCK_ZERO_PAD2_SHIFT  16
 	__le32 prod_index;
-#define STATUS_BLOCK_E5_PROD_INDEX_MASK  0xFFFFFF
-#define STATUS_BLOCK_E5_PROD_INDEX_SHIFT 0
-#define STATUS_BLOCK_E5_ZERO_PAD3_MASK   0xFF
-#define STATUS_BLOCK_E5_ZERO_PAD3_SHIFT  24
+#define STATUS_BLOCK_PROD_INDEX_MASK  0xFFFFFF
+#define STATUS_BLOCK_PROD_INDEX_SHIFT 0
+#define STATUS_BLOCK_ZERO_PAD3_MASK   0xFF
+#define STATUS_BLOCK_ZERO_PAD3_SHIFT  24
 };
 
 
drivers/net/qede/base/ecore_cxt.c +2 -2
index 5c3370e10..bc5628c4e 100644
@@ -54,8 +54,8 @@
 
 /* connection context union */
 union conn_context {
-	struct e4_core_conn_context core_ctx;
-	struct e4_eth_conn_context eth_ctx;
+	struct core_conn_context core_ctx;
+	struct eth_conn_context eth_ctx;
 };
 
 /* TYPE-0 task context - iSCSI, FCOE */
drivers/net/qede/base/ecore_dcbx.c +1 -1
index cbc69cde7..b82ca49ff 100644
@@ -159,7 +159,7 @@ ecore_dcbx_set_params(struct ecore_dcbx_results *p_data,
 	if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits) &&
 	    (type == DCBX_PROTOCOL_ROCE)) {
 		ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
-		ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_PCP_BB_K2, prio << 1);
+		ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_PCP, prio << 1);
 	}
 }
 
drivers/net/qede/base/ecore_dev.c +62 -54

230 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_common.h +338 -509

927 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_eth.h +571 -737

1,455 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_init_tool.h +2 -2
index 0e157f9bc..1fe4bfc61 100644
@@ -23,7 +23,6 @@
 enum chip_ids {
 	CHIP_BB,
 	CHIP_K2,
-	CHIP_E5,
 	MAX_CHIP_IDS
 };
 
@@ -134,7 +133,8 @@ enum init_modes {
 	MODE_PORTS_PER_ENG_2,
 	MODE_PORTS_PER_ENG_4,
 	MODE_100G,
-	MODE_E5,
+	MODE_SKIP_PRAM_INIT,
+	MODE_EMUL_MAC,
 	MAX_INIT_MODES
 };
 
drivers/net/qede/base/ecore_init_fw_funcs.c +20 -22

72 lines not on this page · raw message

drivers/net/qede/base/ecore_int.c +4 -4
index 7368d55f7..c8536380c 100644
@@ -29,7 +29,7 @@ struct ecore_pi_info {
 struct ecore_sb_sp_info {
 	struct ecore_sb_info sb_info;
 	/* per protocol index data */
-	struct ecore_pi_info pi_info_arr[PIS_PER_SB_E4];
+	struct ecore_pi_info pi_info_arr[MAX_PIS_PER_SB];
 };
 
 enum ecore_attention_type {
@@ -1514,7 +1514,7 @@ static void _ecore_int_cau_conf_pi(struct ecore_hwfn *p_hwfn,
 	if (IS_VF(p_hwfn->p_dev))
 		return;/* @@@TBD MichalK- VF CAU... */
 
-	sb_offset = igu_sb_id * PIS_PER_SB_E4;
+	sb_offset = igu_sb_id * MAX_PIS_PER_SB;
 	OSAL_MEMSET(&pi_entry, 0, sizeof(struct cau_pi_entry));
 
 	SET_FIELD(pi_entry.prod, CAU_PI_ENTRY_PI_TIMESET, timeset);
@@ -2692,10 +2692,10 @@ enum _ecore_status_t ecore_int_get_sb_dbg(struct ecore_hwfn *p_hwfn,
 	p_info->igu_cons = ecore_rd(p_hwfn, p_ptt,
 				    IGU_REG_CONSUMER_MEM + sbid * 4);
 
-	for (i = 0; i < PIS_PER_SB_E4; i++)
+	for (i = 0; i < MAX_PIS_PER_SB; i++)
 		p_info->pi[i] = (u16)ecore_rd(p_hwfn, p_ptt,
 					      CAU_REG_PI_MEMORY +
-					      sbid * 4 * PIS_PER_SB_E4 +
+					      sbid * 4 * MAX_PIS_PER_SB +
 					      i * 4);
 
 	return ECORE_SUCCESS;
drivers/net/qede/base/ecore_int.h +2 -2
index ff2310cff..5042cd1d1 100644
@@ -16,8 +16,8 @@
 #define ECORE_SB_ATT_IDX	0x0001
 #define ECORE_SB_EVENT_MASK	0x0003
 
-#define SB_ALIGNED_SIZE(p_hwfn)					\
-	ALIGNED_TYPE_SIZE(struct status_block_e4, p_hwfn)
+#define SB_ALIGNED_SIZE(p_hwfn) \
+	ALIGNED_TYPE_SIZE(struct status_block, p_hwfn)
 
 #define ECORE_SB_INVALID_IDX	0xffff
 
drivers/net/qede/base/ecore_int_api.h +3 -3
index 42538a46c..abea2a716 100644
@@ -24,7 +24,7 @@ enum ecore_int_mode {
 #endif
 
 struct ecore_sb_info {
-	struct status_block_e4 *sb_virt;
+	struct status_block *sb_virt;
 	dma_addr_t sb_phys;
 	u32 sb_ack;		/* Last given ack */
 	u16 igu_sb_id;
@@ -42,7 +42,7 @@ struct ecore_sb_info {
 struct ecore_sb_info_dbg {
 	u32 igu_prod;
 	u32 igu_cons;
-	u16 pi[PIS_PER_SB_E4];
+	u16 pi[MAX_PIS_PER_SB];
 };
 
 struct ecore_sb_cnt_info {
@@ -65,7 +65,7 @@ static OSAL_INLINE u16 ecore_sb_update_sb_idx(struct ecore_sb_info *sb_info)
 	/* barrier(); status block is written to by the chip */
 	/* FIXME: need some sort of barrier. */
 	prod = OSAL_LE32_TO_CPU(sb_info->sb_virt->prod_index) &
-	    STATUS_BLOCK_E4_PROD_INDEX_MASK;
+	       STATUS_BLOCK_PROD_INDEX_MASK;
 	if (sb_info->sb_ack != prod) {
 		sb_info->sb_ack = prod;
 		rc |= ECORE_SB_IDX;
drivers/net/qede/base/ecore_iov_api.h +2 -2
index 55de7086d..c998dbf8d 100644
@@ -740,7 +740,7 @@ ecore_iov_pf_configure_vf_queue_coalesce(struct ecore_hwfn *p_hwfn,
  * @param p_hwfn
  * @param rel_vf_id
  *
- * @return MAX_NUM_VFS_E4 in case no further active VFs, otherwise index.
+ * @return MAX_NUM_VFS_K2 in case no further active VFs, otherwise index.
  */
 u16 ecore_iov_get_next_active_vf(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);
 
@@ -764,7 +764,7 @@ void ecore_iov_set_vf_hw_channel(struct ecore_hwfn *p_hwfn, int vfid,
 
 #define ecore_for_each_vf(_p_hwfn, _i)					\
 	for (_i = ecore_iov_get_next_active_vf(_p_hwfn, 0);		\
-	     _i < MAX_NUM_VFS_E4;					\
+	     _i < MAX_NUM_VFS_K2;					\
 	     _i = ecore_iov_get_next_active_vf(_p_hwfn, _i + 1))
 
 #endif
drivers/net/qede/base/ecore_mcp.c +2 -2
index 1a5152ec5..23336c282 100644
@@ -1703,7 +1703,7 @@ static void ecore_mcp_update_stag(struct ecore_hwfn *p_hwfn,
 
 			/* Configure DB to add external vlan to EDPM packets */
 			ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
-			ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID_BB_K2,
+			ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID,
 				 p_hwfn->hw_info.ovlan);
 		} else {
 			ecore_wr(p_hwfn, p_ptt, NIG_REG_LLH_FUNC_TAG_EN, 0);
@@ -1711,7 +1711,7 @@ static void ecore_mcp_update_stag(struct ecore_hwfn *p_hwfn,
 
 			/* Configure DB to add external vlan to EDPM packets */
 			ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 0);
-			ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID_BB_K2, 0);
+			ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID, 0);
 		}
 
 		ecore_sp_pf_update_stag(p_hwfn);
drivers/net/qede/base/ecore_spq.c +4 -4
index 88ad961e7..486b21dd9 100644
@@ -188,7 +188,7 @@ ecore_spq_fill_entry(struct ecore_hwfn *p_hwfn, struct ecore_spq_entry *p_ent)
 static void ecore_spq_hw_initialize(struct ecore_hwfn *p_hwfn,
 				    struct ecore_spq *p_spq)
 {
-	struct e4_core_conn_context *p_cxt;
+	struct core_conn_context *p_cxt;
 	struct ecore_cxt_info cxt_info;
 	u16 physical_q;
 	enum _ecore_status_t rc;
@@ -210,14 +210,14 @@ static void ecore_spq_hw_initialize(struct ecore_hwfn *p_hwfn,
 
 	if (ECORE_IS_BB(p_hwfn->p_dev) || ECORE_IS_AH(p_hwfn->p_dev)) {
 		SET_FIELD(p_cxt->xstorm_ag_context.flags10,
-			  E4_XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN, 1);
+			  XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN, 1);
 		SET_FIELD(p_cxt->xstorm_ag_context.flags1,
-			  E4_XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE, 1);
+			  XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE, 1);
 		/* SET_FIELD(p_cxt->xstorm_ag_context.flags10,
 		 *	  E4_XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_EN, 1);
 		 */
 		SET_FIELD(p_cxt->xstorm_ag_context.flags9,
-			  E4_XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN, 1);
+			  XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN, 1);
 	}
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_sriov.c +2 -2
index 7d73ef9fb..d771ac6d4 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_sriov.h +2 -2
index 50c7d2c93..e748e67d7 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/reg_addr.h +30 -35

65 lines not on this page · raw message

drivers/net/qede/qede_rxtx.c +4 -4
index fffccf070..d6382b62c 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.18.0

Part of the diff is not shown here. View the raw message.

#18 lore raw

PATCH v2 5/9 net/qede/base: update rt defs NVM cfg and mcp code

In reply to Rasesh Mody

Update and add runtime array offsets (rt defs), non-volatile memory configuration options (nvm cfg) and management co-processor (mcp) shared code in preparation to update the firmware to version 8.40.25.0.

---
 drivers/net/qede/base/bcm_osal.h      |   5 +-
 drivers/net/qede/base/ecore_rt_defs.h | 870 +++++++++++-------------
 drivers/net/qede/base/mcp_public.h    |  59 +-
 drivers/net/qede/base/nvm_cfg.h       | 909 +++++++++++++++++++++++++-
 4 files changed, 1351 insertions(+), 492 deletions(-)
drivers/net/qede/base/bcm_osal.h +3 -2
index 51edc4151..0f09557cf 100644
@@ -148,8 +148,8 @@ void osal_dma_free_mem(struct ecore_dev *edev, dma_addr_t phys);
 			      ((u8 *)(uintptr_t)(_p_hwfn->doorbells) +	\
 			      (_db_addr)), (u32)_val)
 
-#define DIRECT_REG_WR64(hwfn, addr, value) nothing
-#define DIRECT_REG_RD64(hwfn, addr) 0
+#define DIRECT_REG_RD64(hwfn, addr) rte_read64(addr)
+#define DIRECT_REG_WR64(hwfn, addr, value) rte_write64((value), (addr))
 
 /* Mutexes */
 
@@ -455,6 +455,7 @@ u32 qede_crc32(u32 crc, u8 *ptr, u32 length);
 
 #define OSAL_DIV_S64(a, b)	((a) / (b))
 #define OSAL_LLDP_RX_TLVS(p_hwfn, tlv_buf, tlv_size) nothing
+#define OSAL_GET_EPOCH(p_hwfn)	0
 #define OSAL_DBG_ALLOC_USER_DATA(p_hwfn, user_data_ptr) (0)
 #define OSAL_DB_REC_OCCURRED(p_hwfn) nothing
 
drivers/net/qede/base/ecore_rt_defs.h +393 -477

905 lines not on this page · raw message

drivers/net/qede/base/mcp_public.h +56 -3

111 lines not on this page · raw message

drivers/net/qede/base/nvm_cfg.h +899 -10

1,010 lines not on this page · raw message

Signature · 1 line
2.18.0
#19 lore raw

PATCH v2 6/9 net/qede/base: move dmae code to HSI

In reply to Rasesh Mody

Move DMA engine (DMAE) structures from base driver to HSI module. Use DMAE_PARAMS_* in place of ECORE_DMAE_FLAG_*. Enforce SET_FIELD() macro where appropriate.

---
 drivers/net/qede/base/ecore_dev.c        | 12 ++--
 drivers/net/qede/base/ecore_dev_api.h    | 92 ------------------------
 drivers/net/qede/base/ecore_hsi_common.h | 58 ++++++++++++++-
 drivers/net/qede/base/ecore_hw.c         | 52 ++++++++------
 drivers/net/qede/base/ecore_hw.h         | 88 +++++++++++++++++------
 drivers/net/qede/base/ecore_init_ops.c   |  4 +-
 drivers/net/qede/base/ecore_sriov.c      | 23 +++---
 7 files changed, 174 insertions(+), 155 deletions(-)
drivers/net/qede/base/ecore_dev.c +6 -6
index 749aea4e8..2c135afd2 100644
@@ -950,7 +950,7 @@ ecore_llh_access_filter(struct ecore_hwfn *p_hwfn,
 			bool b_write_access)
 {
 	u8 pfid = ECORE_PFID_BY_PPFID(p_hwfn, abs_ppfid);
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 	enum _ecore_status_t rc;
 	u32 addr;
 
@@ -973,15 +973,15 @@ ecore_llh_access_filter(struct ecore_hwfn *p_hwfn,
 	OSAL_MEMSET(&params, 0, sizeof(params));
 
 	if (b_write_access) {
-		params.flags = ECORE_DMAE_FLAG_PF_DST;
-		params.dst_pfid = pfid;
+		SET_FIELD(params.flags, DMAE_PARAMS_DST_PF_VALID, 0x1);
+		params.dst_pf_id = pfid;
 		rc = ecore_dmae_host2grc(p_hwfn, p_ptt,
 					 (u64)(osal_uintptr_t)&p_details->value,
 					 addr, 2 /* size_in_dwords */, &params);
 	} else {
-		params.flags = ECORE_DMAE_FLAG_PF_SRC |
-			       ECORE_DMAE_FLAG_COMPLETION_DST;
-		params.src_pfid = pfid;
+		SET_FIELD(params.flags, DMAE_PARAMS_SRC_PF_VALID, 0x1);
+		SET_FIELD(params.flags, DMAE_PARAMS_COMPLETION_DST, 0x1);
+		params.src_pf_id = pfid;
 		rc = ecore_dmae_grc2host(p_hwfn, p_ptt, addr,
 					 (u64)(osal_uintptr_t)&p_details->value,
 					 2 /* size_in_dwords */, &params);
drivers/net/qede/base/ecore_dev_api.h +0 -92

98 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_common.h +57 -1

70 lines not on this page · raw message

drivers/net/qede/base/ecore_hw.c +30 -22

120 lines not on this page · raw message

drivers/net/qede/base/ecore_hw.h +67 -21

106 lines not on this page · raw message

drivers/net/qede/base/ecore_init_ops.c +2 -2
index 044308bf4..8f7209100 100644
@@ -179,12 +179,12 @@ static enum _ecore_status_t ecore_init_fill_dmae(struct ecore_hwfn *p_hwfn,
 						 u32 addr, u32 fill_count)
 {
 	static u32 zero_buffer[DMAE_MAX_RW_SIZE];
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 
 	OSAL_MEMSET(zero_buffer, 0, sizeof(u32) * DMAE_MAX_RW_SIZE);
 
 	OSAL_MEMSET(&params, 0, sizeof(params));
-	params.flags = ECORE_DMAE_FLAG_RW_REPL_SRC;
+	SET_FIELD(params.flags, DMAE_PARAMS_RW_REPL_SRC, 0x1);
 	return ecore_dmae_host2grc(p_hwfn, p_ptt,
 				   (osal_uintptr_t)&zero_buffer[0],
 				   addr, fill_count, &params);
drivers/net/qede/base/ecore_sriov.c +12 -11
index d771ac6d4..264217252 100644
@@ -347,7 +347,7 @@ enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn *p_hwfn,
 {
 	struct ecore_bulletin_content *p_bulletin;
 	int crc_size = sizeof(p_bulletin->crc);
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 	struct ecore_vf_info *p_vf;
 
 	p_vf = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
@@ -371,8 +371,8 @@ enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn *p_hwfn,
 
 	/* propagate bulletin board via dmae to vm memory */
 	OSAL_MEMSET(&params, 0, sizeof(params));
-	params.flags = ECORE_DMAE_FLAG_VF_DST;
-	params.dst_vfid = p_vf->abs_vf_id;
+	SET_FIELD(params.flags, DMAE_PARAMS_DST_VF_VALID, 0x1);
+	params.dst_vf_id = p_vf->abs_vf_id;
 	return ecore_dmae_host2host(p_hwfn, p_ptt, p_vf->bulletin.phys,
 				    p_vf->vf_bulletin, p_vf->bulletin.size / 4,
 				    &params);
@@ -1374,7 +1374,7 @@ static void ecore_iov_send_response(struct ecore_hwfn *p_hwfn,
 				    u8 status)
 {
 	struct ecore_iov_vf_mbx *mbx = &p_vf->vf_mbx;
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 	u8 eng_vf_id;
 
 	mbx->reply_virt->default_resp.hdr.status = status;
@@ -1391,9 +1391,9 @@ static void ecore_iov_send_response(struct ecore_hwfn *p_hwfn,
 
 	eng_vf_id = p_vf->abs_vf_id;
 
-	OSAL_MEMSET(&params, 0, sizeof(struct ecore_dmae_params));
-	params.flags = ECORE_DMAE_FLAG_VF_DST;
-	params.dst_vfid = eng_vf_id;
+	OSAL_MEMSET(&params, 0, sizeof(struct dmae_params));
+	SET_FIELD(params.flags, DMAE_PARAMS_DST_VF_VALID, 0x1);
+	params.dst_vf_id = eng_vf_id;
 
 	ecore_dmae_host2host(p_hwfn, p_ptt, mbx->reply_phys + sizeof(u64),
 			     mbx->req_virt->first_tlv.reply_address +
@@ -4389,16 +4389,17 @@ u16 ecore_iov_get_next_active_vf(struct ecore_hwfn *p_hwfn, u16 rel_vf_id)
 enum _ecore_status_t ecore_iov_copy_vf_msg(struct ecore_hwfn *p_hwfn,
 					   struct ecore_ptt *ptt, int vfid)
 {
-	struct ecore_dmae_params params;
+	struct dmae_params params;
 	struct ecore_vf_info *vf_info;
 
 	vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
 	if (!vf_info)
 		return ECORE_INVAL;
 
-	OSAL_MEMSET(&params, 0, sizeof(struct ecore_dmae_params));
-	params.flags = ECORE_DMAE_FLAG_VF_SRC | ECORE_DMAE_FLAG_COMPLETION_DST;
-	params.src_vfid = vf_info->abs_vf_id;
+	OSAL_MEMSET(&params, 0, sizeof(struct dmae_params));
+	SET_FIELD(params.flags, DMAE_PARAMS_SRC_VF_VALID, 0x1);
+	SET_FIELD(params.flags, DMAE_PARAMS_COMPLETION_DST, 0x1);
+	params.src_vf_id = vf_info->abs_vf_id;
 
 	if (ecore_dmae_host2host(p_hwfn, ptt,
 				 vf_info->vf_mbx.pending_req,
Signature · 1 line
2.18.0
#20 lore raw

PATCH v2 7/9 net/qede/base: update HSI code

In reply to Rasesh Mody

Update hardware software common base driver code in preparation to update the firmware to version 8.40.25.0.

---
 drivers/net/qede/base/bcm_osal.c              |   1 +
 drivers/net/qede/base/common_hsi.h            | 164 ++++--
 drivers/net/qede/base/ecore.h                 |   4 +-
 drivers/net/qede/base/ecore_cxt.c             |  23 +-
 drivers/net/qede/base/ecore_dev.c             |  21 +-
 drivers/net/qede/base/ecore_gtt_reg_addr.h    |  42 +-
 drivers/net/qede/base/ecore_gtt_values.h      |  18 +-
 drivers/net/qede/base/ecore_hsi_common.h      | 231 +++++++--
 drivers/net/qede/base/ecore_hsi_debug_tools.h | 475 ++++++++----------
 drivers/net/qede/base/ecore_hsi_eth.h         | 134 ++---
 drivers/net/qede/base/ecore_hsi_init_func.h   |  25 +-
 drivers/net/qede/base/ecore_hsi_init_tool.h   |  38 ++
 drivers/net/qede/base/ecore_hw.c              |  16 +
 drivers/net/qede/base/ecore_hw.h              |  10 +-
 drivers/net/qede/base/ecore_init_fw_funcs.c   |   7 +-
 drivers/net/qede/base/ecore_init_ops.c        |  47 --
 drivers/net/qede/base/ecore_init_ops.h        |  10 -
 drivers/net/qede/base/ecore_iro.h             | 320 ++++++------
 drivers/net/qede/base/ecore_iro_values.h      | 336 ++++++++-----
 drivers/net/qede/base/ecore_mcp.c             |   1 +
 drivers/net/qede/base/eth_common.h            | 101 +++-
 drivers/net/qede/base/reg_addr.h              |  10 +
 drivers/net/qede/qede_rxtx.c                  |  16 +-
 23 files changed, 1218 insertions(+), 832 deletions(-)
drivers/net/qede/base/bcm_osal.c +1 -0
index 9915df44f..48d016e24 100644
@@ -10,6 +10,7 @@
 #include "bcm_osal.h"
 #include "ecore.h"
 #include "ecore_hw.h"
+#include "ecore_dev_api.h"
 #include "ecore_iov_api.h"
 #include "ecore_mcp_api.h"
 #include "ecore_l2_api.h"
drivers/net/qede/base/common_hsi.h +131 -33

291 lines not on this page · raw message

drivers/net/qede/base/ecore.h +2 -2
index 524a1dd46..b1d8706c9 100644
@@ -834,8 +834,8 @@ struct ecore_dev {
 	u8				cache_shift;
 
 	/* Init */
-	const struct iro		*iro_arr;
-	#define IRO (p_hwfn->p_dev->iro_arr)
+	const u32			*iro_arr;
+#define IRO	((const struct iro *)p_hwfn->p_dev->iro_arr)
 
 	/* HW functions */
 	u8				num_hwfns;
drivers/net/qede/base/ecore_cxt.c +11 -12
index bc5628c4e..0f04c9447 100644
@@ -190,9 +190,7 @@ struct ecore_cxt_mngr {
 
 	/* Acquired CIDs */
 	struct ecore_cid_acquired_map acquired[MAX_CONN_TYPES];
-	/* TBD - do we want this allocated to reserve space? */
-	struct ecore_cid_acquired_map
-		acquired_vf[MAX_CONN_TYPES][COMMON_MAX_NUM_VFS];
+	struct ecore_cid_acquired_map *acquired_vf[MAX_CONN_TYPES];
 
 	/* ILT  shadow table */
 	struct ecore_dma_mem *ilt_shadow;
@@ -1040,8 +1038,8 @@ static enum _ecore_status_t ecore_ilt_shadow_alloc(struct ecore_hwfn *p_hwfn)
 
 static void ecore_cid_map_free(struct ecore_hwfn *p_hwfn)
 {
+	u32 type, vf, max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
-	u32 type, vf;
 
 	for (type = 0; type < MAX_CONN_TYPES; type++) {
 		OSAL_FREE(p_hwfn->p_dev, p_mngr->acquired[type].cid_map);
@@ -1049,7 +1047,7 @@ static void ecore_cid_map_free(struct ecore_hwfn *p_hwfn)
 		p_mngr->acquired[type].max_count = 0;
 		p_mngr->acquired[type].start_cid = 0;
 
-		for (vf = 0; vf < COMMON_MAX_NUM_VFS; vf++) {
+		for (vf = 0; vf < max_num_vfs; vf++) {
 			OSAL_FREE(p_hwfn->p_dev,
 				  p_mngr->acquired_vf[type][vf].cid_map);
 			p_mngr->acquired_vf[type][vf].cid_map = OSAL_NULL;
@@ -1087,6 +1085,7 @@ ecore_cid_map_alloc_single(struct ecore_hwfn *p_hwfn, u32 type,
 static enum _ecore_status_t ecore_cid_map_alloc(struct ecore_hwfn *p_hwfn)
 {
 	struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
+	u32 max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	u32 start_cid = 0, vf_start_cid = 0;
 	u32 type, vf;
 
@@ -1101,7 +1100,7 @@ static enum _ecore_status_t ecore_cid_map_alloc(struct ecore_hwfn *p_hwfn)
 			goto cid_map_fail;
 
 		/* Handle VF maps */
-		for (vf = 0; vf < COMMON_MAX_NUM_VFS; vf++) {
+		for (vf = 0; vf < max_num_vfs; vf++) {
 			p_map = &p_mngr->acquired_vf[type][vf];
 			if (ecore_cid_map_alloc_single(p_hwfn, type,
 						       vf_start_cid,
@@ -1236,10 +1235,10 @@ void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn)
 void ecore_cxt_mngr_setup(struct ecore_hwfn *p_hwfn)
 {
 	struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
+	u32 len, max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	struct ecore_cid_acquired_map *p_map;
 	struct ecore_conn_type_cfg *p_cfg;
 	int type;
-	u32 len;
 
 	/* Reset acquired cids */
 	for (type = 0; type < MAX_CONN_TYPES; type++) {
@@ -1257,7 +1256,7 @@ void ecore_cxt_mngr_setup(struct ecore_hwfn *p_hwfn)
 		if (!p_cfg->cids_per_vf)
 			continue;
 
-		for (vf = 0; vf < COMMON_MAX_NUM_VFS; vf++) {
+		for (vf = 0; vf < max_num_vfs; vf++) {
 			p_map = &p_mngr->acquired_vf[type][vf];
 			len = DIV_ROUND_UP(p_map->max_count,
 					   BITS_PER_MAP_WORD) *
@@ -1818,16 +1817,16 @@ enum _ecore_status_t _ecore_cxt_acquire_cid(struct ecore_hwfn *p_hwfn,
 					    enum protocol_type type,
 					    u32 *p_cid, u8 vfid)
 {
+	u32 rel_cid, max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
 	struct ecore_cid_acquired_map *p_map;
-	u32 rel_cid;
 
 	if (type >= MAX_CONN_TYPES) {
 		DP_NOTICE(p_hwfn, true, "Invalid protocol type %d", type);
 		return ECORE_INVAL;
 	}
 
-	if (vfid >= COMMON_MAX_NUM_VFS && vfid != ECORE_CXT_PF_CID) {
+	if (vfid >= max_num_vfs && vfid != ECORE_CXT_PF_CID) {
 		DP_NOTICE(p_hwfn, true, "VF [%02x] is out of range\n", vfid);
 		return ECORE_INVAL;
 	}
@@ -1913,12 +1912,12 @@ static bool ecore_cxt_test_cid_acquired(struct ecore_hwfn *p_hwfn,
 
 void _ecore_cxt_release_cid(struct ecore_hwfn *p_hwfn, u32 cid, u8 vfid)
 {
+	u32 rel_cid, max_num_vfs = NUM_OF_VFS(p_hwfn->p_dev);
 	struct ecore_cid_acquired_map *p_map = OSAL_NULL;
 	enum protocol_type type;
 	bool b_acquired;
-	u32 rel_cid;
 
-	if (vfid != ECORE_CXT_PF_CID && vfid > COMMON_MAX_NUM_VFS) {
+	if (vfid != ECORE_CXT_PF_CID && vfid > max_num_vfs) {
 		DP_NOTICE(p_hwfn, true,
 			  "Trying to return incorrect CID belonging to VF %02x\n",
 			  vfid);
drivers/net/qede/base/ecore_dev.c +9 -12
index 2c135afd2..2a11b4d29 100644
@@ -1843,7 +1843,7 @@ static void ecore_init_qm_vport_params(struct ecore_hwfn *p_hwfn)
 
 	/* all vports participate in weighted fair queueing */
 	for (i = 0; i < ecore_init_qm_get_num_vports(p_hwfn); i++)
-		qm_info->qm_vport_params[i].vport_wfq = 1;
+		qm_info->qm_vport_params[i].wfq = 1;
 }
 
 /* initialize qm port params */
@@ -2236,11 +2236,8 @@ static void ecore_dp_init_qm_params(struct ecore_hwfn *p_hwfn)
 	/* vport table */
 	for (i = 0; i < qm_info->num_vports; i++) {
 		vport = &qm_info->qm_vport_params[i];
-		DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
-			   "vport idx %d, vport_rl %d, wfq %d,"
-			   " first_tx_pq_id [ ",
-			   qm_info->start_vport + i, vport->vport_rl,
-			   vport->vport_wfq);
+		DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "vport idx %d, wfq %d, first_tx_pq_id [ ",
+			   qm_info->start_vport + i, vport->wfq);
 		for (tc = 0; tc < NUM_OF_TCS; tc++)
 			DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "%d ",
 				   vport->first_tx_pq_id[tc]);
@@ -2866,7 +2863,7 @@ static enum _ecore_status_t ecore_hw_init_common(struct ecore_hwfn *p_hwfn,
 	ecore_init_cau_rt_data(p_dev);
 
 	/* Program GTT windows */
-	ecore_gtt_init(p_hwfn, p_ptt);
+	ecore_gtt_init(p_hwfn);
 
 #ifndef ASIC_ONLY
 	if (CHIP_REV_IS_EMUL(p_dev)) {
@@ -6248,7 +6245,7 @@ enum _ecore_status_t ecore_set_txq_coalesce(struct ecore_hwfn *p_hwfn,
 
 /* Calculate final WFQ values for all vports and configure it.
  * After this configuration each vport must have
- * approx min rate =  vport_wfq * min_pf_rate / ECORE_WFQ_UNIT
+ * approx min rate =  wfq * min_pf_rate / ECORE_WFQ_UNIT
  */
 static void ecore_configure_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
 					       struct ecore_ptt *p_ptt,
@@ -6262,11 +6259,11 @@ static void ecore_configure_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
 	for (i = 0; i < p_hwfn->qm_info.num_vports; i++) {
 		u32 wfq_speed = p_hwfn->qm_info.wfq_data[i].min_speed;
 
-		vport_params[i].vport_wfq = (wfq_speed * ECORE_WFQ_UNIT) /
+		vport_params[i].wfq = (wfq_speed * ECORE_WFQ_UNIT) /
 		    min_pf_rate;
 		ecore_init_vport_wfq(p_hwfn, p_ptt,
 				     vport_params[i].first_tx_pq_id,
-				     vport_params[i].vport_wfq);
+				     vport_params[i].wfq);
 	}
 }
 
@@ -6275,7 +6272,7 @@ static void ecore_init_wfq_default_param(struct ecore_hwfn *p_hwfn)
 	int i;
 
 	for (i = 0; i < p_hwfn->qm_info.num_vports; i++)
-		p_hwfn->qm_info.qm_vport_params[i].vport_wfq = 1;
+		p_hwfn->qm_info.qm_vport_params[i].wfq = 1;
 }
 
 static void ecore_disable_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
@@ -6290,7 +6287,7 @@ static void ecore_disable_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
 		ecore_init_wfq_default_param(p_hwfn);
 		ecore_init_vport_wfq(p_hwfn, p_ptt,
 				     vport_params[i].first_tx_pq_id,
-				     vport_params[i].vport_wfq);
+				     vport_params[i].wfq);
 	}
 }
 
drivers/net/qede/base/ecore_gtt_reg_addr.h +26 -16

69 lines not on this page · raw message

drivers/net/qede/base/ecore_gtt_values.h +9 -9
index adc20c0ce..2035bed5c 100644
@@ -13,15 +13,15 @@ static u32 pxp_global_win[] = {
 	0x1c80, /* win 3: addr=0x1c80000, size=4096 bytes */
 	0x1d00, /* win 4: addr=0x1d00000, size=4096 bytes */
 	0x1d01, /* win 5: addr=0x1d01000, size=4096 bytes */
-	0x1d80, /* win 6: addr=0x1d80000, size=4096 bytes */
-	0x1d81, /* win 7: addr=0x1d81000, size=4096 bytes */
-	0x1d82, /* win 8: addr=0x1d82000, size=4096 bytes */
-	0x1e00, /* win 9: addr=0x1e00000, size=4096 bytes */
-	0x1e80, /* win 10: addr=0x1e80000, size=4096 bytes */
-	0x1f00, /* win 11: addr=0x1f00000, size=4096 bytes */
-	0,
-	0,
-	0,
+	0x1d02, /* win 6: addr=0x1d02000, size=4096 bytes */
+	0x1d80, /* win 7: addr=0x1d80000, size=4096 bytes */
+	0x1d81, /* win 8: addr=0x1d81000, size=4096 bytes */
+	0x1d82, /* win 9: addr=0x1d82000, size=4096 bytes */
+	0x1e00, /* win 10: addr=0x1e00000, size=4096 bytes */
+	0x1e01, /* win 11: addr=0x1e01000, size=4096 bytes */
+	0x1e80, /* win 12: addr=0x1e80000, size=4096 bytes */
+	0x1f00, /* win 13: addr=0x1f00000, size=4096 bytes */
+	0x1c08, /* win 14: addr=0x1c08000, size=4096 bytes */
 	0,
 	0,
 	0,
drivers/net/qede/base/ecore_hsi_common.h +189 -42

377 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_debug_tools.h +199 -276

639 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_eth.h +76 -58

181 lines not on this page · raw message

drivers/net/qede/base/ecore_hsi_init_func.h +16 -9
index d77edaa1d..7efe2eff1 100644
@@ -88,7 +88,18 @@ struct init_nig_pri_tc_map_req {
 
 
 /*
- * QM per-port init parameters
+ * QM per global RL init parameters
+ */
+struct init_qm_global_rl_params {
+/* Rate limit in Mb/sec units. If set to zero, the link speed is uwsed
+ * instead.
+ */
+	u32 rate_limit;
+};
+
+
+/*
+ * QM per port init parameters
  */
 struct init_qm_port_params {
 	u8 active /* Indicates if this port is active */;
@@ -111,24 +122,20 @@ struct init_qm_pq_params {
 	u8 wrr_group /* WRR group */;
 /* Indicates if a rate limiter should be allocated for the PQ (0/1) */
 	u8 rl_valid;
+	u16 rl_id /* RL ID, valid only if rl_valid is true */;
 	u8 port_id /* Port ID */;
-	u8 reserved0;
-	u16 reserved1;
+	u8 reserved;
 };
 
 
 /*
- * QM per-vport init parameters
+ * QM per VPORT init parameters
  */
 struct init_qm_vport_params {
-/* rate limit in Mb/sec units. a value of 0 means dont configure. ignored if
- * VPORT RL is globally disabled.
- */
-	u32 vport_rl;
 /* WFQ weight. A value of 0 means dont configure. ignored if VPORT WFQ is
  * globally disabled.
  */
-	u16 vport_wfq;
+	u16 wfq;
 /* the first Tx PQ ID associated with this VPORT for each TC. */
 	u16 first_tx_pq_id[NUM_OF_TCS];
 };
drivers/net/qede/base/ecore_hsi_init_tool.h +38 -0
index 1fe4bfc61..4f878d061 100644
@@ -46,10 +46,24 @@ enum bin_init_buffer_type {
 	BIN_BUF_INIT_VAL /* init data */,
 	BIN_BUF_INIT_MODE_TREE /* init modes tree */,
 	BIN_BUF_INIT_IRO /* internal RAM offsets */,
+	BIN_BUF_INIT_OVERLAYS /* FW overlays (except overlay 0) */,
 	MAX_BIN_INIT_BUFFER_TYPE
 };
 
 
+/*
+ * FW overlay buffer header
+ */
+struct fw_overlay_buf_hdr {
+	u32 data;
+#define FW_OVERLAY_BUF_HDR_STORM_ID_MASK  0xFF /* Storm ID */
+#define FW_OVERLAY_BUF_HDR_STORM_ID_SHIFT 0
+/* Size of Storm FW overlay buffer in dwords */
+#define FW_OVERLAY_BUF_HDR_BUF_SIZE_MASK  0xFFFFFF
+#define FW_OVERLAY_BUF_HDR_BUF_SIZE_SHIFT 8
+};
+
+
 /*
  * init array header: raw
  */
@@ -117,6 +131,30 @@ union init_array_hdr {
 };
 
 
+enum dbg_bus_clients {
+	DBG_BUS_CLIENT_RBCN,
+	DBG_BUS_CLIENT_RBCP,
+	DBG_BUS_CLIENT_RBCR,
+	DBG_BUS_CLIENT_RBCT,
+	DBG_BUS_CLIENT_RBCU,
+	DBG_BUS_CLIENT_RBCF,
+	DBG_BUS_CLIENT_RBCX,
+	DBG_BUS_CLIENT_RBCS,
+	DBG_BUS_CLIENT_RBCH,
+	DBG_BUS_CLIENT_RBCZ,
+	DBG_BUS_CLIENT_OTHER_ENGINE,
+	DBG_BUS_CLIENT_TIMESTAMP,
+	DBG_BUS_CLIENT_CPU,
+	DBG_BUS_CLIENT_RBCY,
+	DBG_BUS_CLIENT_RBCQ,
+	DBG_BUS_CLIENT_RBCM,
+	DBG_BUS_CLIENT_RBCB,
+	DBG_BUS_CLIENT_RBCW,
+	DBG_BUS_CLIENT_RBCV,
+	MAX_DBG_BUS_CLIENTS
+};
+
+
 enum init_modes {
 	MODE_BB_A0_DEPRECATED,
 	MODE_BB,
drivers/net/qede/base/ecore_hw.c +16 -0
index 6a79db52e..0aed043bb 100644
@@ -12,6 +12,8 @@
 #include "reg_addr.h"
 #include "ecore_utils.h"
 #include "ecore_iov_api.h"
+#include "ecore_gtt_values.h"
+#include "ecore_dev_api.h"
 
 #ifndef ASIC_ONLY
 #define ECORE_EMUL_FACTOR 2000
@@ -78,6 +80,20 @@ enum _ecore_status_t ecore_ptt_pool_alloc(struct ecore_hwfn *p_hwfn)
 	return ECORE_SUCCESS;
 }
 
+void ecore_gtt_init(struct ecore_hwfn *p_hwfn)
+{
+	u32 gtt_base;
+	u32 i;
+
+	/* Set the global windows */
+	gtt_base = PXP_PF_WINDOW_ADMIN_START + PXP_PF_WINDOW_ADMIN_GLOBAL_START;
+
+	for (i = 0; i < OSAL_ARRAY_SIZE(pxp_global_win); i++)
+		if (pxp_global_win[i])
+			REG_WR(p_hwfn, gtt_base + i * PXP_GLOBAL_ENTRY_SIZE,
+			       pxp_global_win[i]);
+}
+
 void ecore_ptt_invalidate(struct ecore_hwfn *p_hwfn)
 {
 	struct ecore_ptt *p_ptt;
drivers/net/qede/base/ecore_hw.h +3 -7
index e43f337dc..238bdb9db 100644
@@ -8,9 +8,8 @@
 #define __ECORE_HW_H__
 
 #include "ecore.h"
-#include "ecore_dev_api.h"
 
-/* Forward decleration */
+/* Forward declaration */
 struct ecore_ptt;
 
 enum reserved_ptts {
@@ -53,10 +52,8 @@ enum reserved_ptts {
 * @brief ecore_gtt_init - Initialize GTT windows
 *
 * @param p_hwfn
-* @param p_ptt
 */
-void ecore_gtt_init(struct ecore_hwfn *p_hwfn,
-		    struct ecore_ptt *p_ptt);
+void ecore_gtt_init(struct ecore_hwfn *p_hwfn);
 
 /**
  * @brief ecore_ptt_invalidate - Forces all ptt entries to be re-configured
@@ -84,7 +81,6 @@ void ecore_ptt_pool_free(struct ecore_hwfn *p_hwfn);
 /**
  * @brief ecore_ptt_get_bar_addr - Get PPT's external BAR address
  *
- * @param p_hwfn
  * @param p_ptt
  *
  * @return u32
@@ -95,8 +91,8 @@ u32 ecore_ptt_get_bar_addr(struct ecore_ptt	*p_ptt);
  * @brief ecore_ptt_set_win - Set PTT Window's GRC BAR address
  *
  * @param p_hwfn
- * @param new_hw_addr
  * @param p_ptt
+ * @param new_hw_addr
  */
 void ecore_ptt_set_win(struct ecore_hwfn	*p_hwfn,
 		       struct ecore_ptt		*p_ptt,
drivers/net/qede/base/ecore_init_fw_funcs.c +3 -4
index 928d41b46..a0a6e3aba 100644
@@ -664,10 +664,10 @@ static int ecore_vp_wfq_rt_init(struct ecore_hwfn *p_hwfn,
 
 	/* Go over all PF VPORTs */
 	for (i = 0; i < num_vports; i++) {
-		if (!vport_params[i].vport_wfq)
+		if (!vport_params[i].wfq)
 			continue;
 
-		inc_val = QM_WFQ_INC_VAL(vport_params[i].vport_wfq);
+		inc_val = QM_WFQ_INC_VAL(vport_params[i].wfq);
 		if (inc_val > QM_WFQ_MAX_INC_VAL) {
 			DP_NOTICE(p_hwfn, true,
 				  "Invalid VPORT WFQ weight configuration\n");
@@ -710,8 +710,7 @@ static int ecore_vport_rl_rt_init(struct ecore_hwfn *p_hwfn,
 
 	/* Go over all PF VPORTs */
 	for (i = 0, vport_id = start_vport; i < num_vports; i++, vport_id++) {
-		inc_val = QM_RL_INC_VAL(vport_params[i].vport_rl ?
-			  vport_params[i].vport_rl : link_speed);
+		inc_val = QM_RL_INC_VAL(link_speed);
 		if (inc_val > QM_VP_RL_MAX_INC_VAL(link_speed)) {
 			DP_NOTICE(p_hwfn, true,
 				  "Invalid VPORT rate-limit configuration\n");
drivers/net/qede/base/ecore_init_ops.c +0 -47

53 lines not on this page · raw message

drivers/net/qede/base/ecore_init_ops.h +0 -10
index de7846d46..21e433309 100644
@@ -97,14 +97,4 @@ void ecore_init_store_rt_agg(struct ecore_hwfn *p_hwfn,
 #define STORE_RT_REG_AGG(hwfn, offset, val)			\
 	ecore_init_store_rt_agg(hwfn, offset, (u32 *)&val, sizeof(val))
 
-
-/**
- * @brief
- *      Initialize GTT global windows and set admin window
- *      related params of GTT/PTT to default values.
- *
- * @param p_hwfn
- */
-void ecore_gtt_init(struct ecore_hwfn *p_hwfn,
-		    struct ecore_ptt *p_ptt);
 #endif /* __ECORE_INIT_OPS__ */
drivers/net/qede/base/ecore_iro.h +176 -144

383 lines not on this page · raw message

drivers/net/qede/base/ecore_iro_values.h +215 -121

342 lines not on this page · raw message

drivers/net/qede/base/ecore_mcp.c +1 -0
index 23336c282..6559d8040 100644
@@ -24,6 +24,7 @@
 
 #define CHIP_MCP_RESP_ITER_US 10
 #define EMUL_MCP_RESP_ITER_US (1000 * 1000)
+#define GRCBASE_MCP	0xe00000
 
 #define ECORE_DRV_MB_MAX_RETRIES (500 * 1000)	/* Account for 5 sec */
 #define ECORE_MCP_RESET_RETRIES (50 * 1000)	/* Account for 500 msec */
drivers/net/qede/base/eth_common.h +79 -22

175 lines not on this page · raw message

drivers/net/qede/base/reg_addr.h +10 -0
index 9277b46fa..91d889dc8 100644
@@ -1235,3 +1235,13 @@
 #define NIG_REG_PPF_TO_ENGINE_SEL 0x508900UL
 #define NIG_REG_LLH_ENG_CLS_ROCE_QP_SEL 0x501b98UL
 #define NIG_REG_LLH_FUNC_FILTER_HDR_SEL 0x501b40UL
+
+#define MCP_REG_CACHE_PAGING_ENABLE 0xe06304UL
+#define PSWRQ2_REG_RESET_STT 0x240008UL
+#define PSWRQ2_REG_PRTY_STS_WR_H_0 0x240208UL
+#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0
+#define PGLUE_B_REG_MASTER_DISCARD_NBLOCK 0x2aa58cUL
+#define PGLUE_B_REG_PRTY_STS_WR_H_0 0x2a8208UL
+#define DORQ_REG_VF_USAGE_CNT_LIM 0x1009ccUL
+#define PGLUE_B_REG_SR_IOV_DISABLED_REQUEST 0x2aa06cUL
+#define PGLUE_B_REG_SR_IOV_DISABLED_REQUEST_CLR 0x2aa070UL
drivers/net/qede/qede_rxtx.c +8 -8
index d6382b62c..40a246229 100644
@@ -1602,17 +1602,17 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			/* Mark it as LRO packet */
 			ol_flags |= PKT_RX_LRO;
 			/* In split mode,  seg_len is same as len_on_first_bd
-			 * and ext_bd_len_list will be empty since there are
+			 * and bw_ext_bd_len_list will be empty since there are
 			 * no additional buffers
 			 */
 			PMD_RX_LOG(INFO, rxq,
-			    "TPA start[%d] - len_on_first_bd %d header %d"
-			    " [bd_list[0] %d], [seg_len %d]\n",
-			    cqe_start_tpa->tpa_agg_index,
-			    rte_le_to_cpu_16(cqe_start_tpa->len_on_first_bd),
-			    cqe_start_tpa->header_len,
-			    rte_le_to_cpu_16(cqe_start_tpa->ext_bd_len_list[0]),
-			    rte_le_to_cpu_16(cqe_start_tpa->seg_len));
+			 "TPA start[%d] - len_on_first_bd %d header %d"
+			 " [bd_list[0] %d], [seg_len %d]\n",
+			 cqe_start_tpa->tpa_agg_index,
+			 rte_le_to_cpu_16(cqe_start_tpa->len_on_first_bd),
+			 cqe_start_tpa->header_len,
+			 rte_le_to_cpu_16(cqe_start_tpa->bw_ext_bd_len_list[0]),
+			 rte_le_to_cpu_16(cqe_start_tpa->seg_len));
 
 		break;
 		case ETH_RX_CQE_TYPE_TPA_CONT:
Signature · 1 line
2.18.0
#21 lore raw

PATCH v2 8/9 net/qede/base: update the FW to 8.40.25.0

In reply to Rasesh Mody

This patch updates the FW to 8.40.25.0 and corresponding base driver changes. It also updates the PMD version to 2.11.0.1. The FW updates consists of enhancements and fixes as described below.

- VF RX queue start ramrod can get stuck due to completion error. Return EQ completion with error, when fail to load VF data. Use VF FID in RX queue start ramrod
- Fix big receive buffer initialization for 100G to address failure leading to BRB hardware assertion
- GRE tunnel traffic doesn't run when non-L2 ethernet protocol is enabled, fix FW to not forward tunneled SYN packets to LL2.
- Fix the FW assert that is caused during vport_update when tx-switching is enabled
- Add initial FW support for VF Representors
- Add ecore_get_hsi_def_val() API to get default HSI values
- Move following from .c to .h files:
TSTORM_QZONE_START and MSTORM_QZONE_START
enum ilt_clients
renamed struct ecore_dma_mem to phys_mem_desc and moved
- Add ecore_cxt_set_cli() and ecore_cxt_set_blk() APIs to set client config and block details
- Use SET_FIELD() macro where appropriate
- Address spell check and code alignment issues

---
 drivers/net/qede/base/ecore.h               |  73 ++-
 drivers/net/qede/base/ecore_cxt.c           | 497 ++++++++------
 drivers/net/qede/base/ecore_cxt.h           |  12 +
 drivers/net/qede/base/ecore_dcbx.c          |   5 +-
 drivers/net/qede/base/ecore_dev.c           | 586 ++++++++++-------
 drivers/net/qede/base/ecore_init_fw_funcs.c | 681 ++++++++++----------
 drivers/net/qede/base/ecore_init_fw_funcs.h | 107 ++-
 drivers/net/qede/base/ecore_init_ops.c      |  15 +-
 drivers/net/qede/base/ecore_init_ops.h      |   2 +-
 drivers/net/qede/base/ecore_int.c           | 129 ++--
 drivers/net/qede/base/ecore_int_api.h       |  11 +-
 drivers/net/qede/base/ecore_l2.c            |  10 +-
 drivers/net/qede/base/ecore_l2_api.h        |   2 +
 drivers/net/qede/base/ecore_mcp.c           | 287 +++++----
 drivers/net/qede/base/ecore_mcp.h           |   9 +-
 drivers/net/qede/base/ecore_proto_if.h      |   1 +
 drivers/net/qede/base/ecore_sp_commands.c   |  15 +-
 drivers/net/qede/base/ecore_spq.c           |  53 +-
 drivers/net/qede/base/ecore_sriov.c         | 157 +++--
 drivers/net/qede/base/ecore_vf.c            |  18 +-
 drivers/net/qede/qede_ethdev.h              |   2 +-
 drivers/net/qede/qede_main.c                |   2 +-
 drivers/net/qede/qede_rxtx.c                |   4 +-
 23 files changed, 1584 insertions(+), 1094 deletions(-)
drivers/net/qede/base/ecore.h +59 -14
index b1d8706c9..925b75cb9 100644
@@ -28,8 +28,8 @@
 #include "mcp_public.h"
 
 #define ECORE_MAJOR_VERSION		8
-#define ECORE_MINOR_VERSION		37
-#define ECORE_REVISION_VERSION		20
+#define ECORE_MINOR_VERSION		40
+#define ECORE_REVISION_VERSION		18
 #define ECORE_ENGINEERING_VERSION	0
 
 #define ECORE_VERSION							\
@@ -467,6 +467,8 @@ struct ecore_wfq_data {
 	bool configured;
 };
 
+#define OFLD_GRP_SIZE 4
+
 struct ecore_qm_info {
 	struct init_qm_pq_params    *qm_pq_params;
 	struct init_qm_vport_params *qm_vport_params;
@@ -513,6 +515,8 @@ struct ecore_fw_data {
 	const u8 *modes_tree_buf;
 	union init_op *init_ops;
 	const u32 *arr_data;
+	const u32 *fw_overlays;
+	u32 fw_overlays_len;
 	u32 init_ops_size;
 };
 
@@ -592,6 +596,7 @@ struct ecore_hwfn {
 
 	u8				num_funcs_on_engine;
 	u8				enabled_func_idx;
+	u8				num_funcs_on_port;
 
 	/* BAR access */
 	void OSAL_IOMEM			*regview;
@@ -745,7 +750,6 @@ struct ecore_dev {
 #endif
 #define ECORE_IS_AH(dev)	((dev)->type == ECORE_DEV_TYPE_AH)
 #define ECORE_IS_K2(dev)	ECORE_IS_AH(dev)
-#define ECORE_IS_E4(dev)	(ECORE_IS_BB(dev) || ECORE_IS_AH(dev))
 
 	u16 vendor_id;
 	u16 device_id;
@@ -893,6 +897,7 @@ struct ecore_dev {
 
 #ifndef ASIC_ONLY
 	bool				b_is_emul_full;
+	bool				b_is_emul_mac;
 #endif
 	/* LLH info */
 	u8				ppfid_bitmap;
@@ -911,16 +916,52 @@ struct ecore_dev {
 	u8				engine_for_debug;
 };
 
-#define NUM_OF_VFS(dev)		(ECORE_IS_BB(dev) ? MAX_NUM_VFS_BB \
-						  : MAX_NUM_VFS_K2)
-#define NUM_OF_L2_QUEUES(dev)	(ECORE_IS_BB(dev) ? MAX_NUM_L2_QUEUES_BB \
-						  : MAX_NUM_L2_QUEUES_K2)
-#define NUM_OF_PORTS(dev)	(ECORE_IS_BB(dev) ? MAX_NUM_PORTS_BB \
-						  : MAX_NUM_PORTS_K2)
-#define NUM_OF_SBS(dev)		(ECORE_IS_BB(dev) ? MAX_SB_PER_PATH_BB \
-						  : MAX_SB_PER_PATH_K2)
-#define NUM_OF_ENG_PFS(dev)	(ECORE_IS_BB(dev) ? MAX_NUM_PFS_BB \
-						  : MAX_NUM_PFS_K2)
+enum ecore_hsi_def_type {
+	ECORE_HSI_DEF_MAX_NUM_VFS,
+	ECORE_HSI_DEF_MAX_NUM_L2_QUEUES,
+	ECORE_HSI_DEF_MAX_NUM_PORTS,
+	ECORE_HSI_DEF_MAX_SB_PER_PATH,
+	ECORE_HSI_DEF_MAX_NUM_PFS,
+	ECORE_HSI_DEF_MAX_NUM_VPORTS,
+	ECORE_HSI_DEF_NUM_ETH_RSS_ENGINE,
+	ECORE_HSI_DEF_MAX_QM_TX_QUEUES,
+	ECORE_HSI_DEF_NUM_PXP_ILT_RECORDS,
+	ECORE_HSI_DEF_NUM_RDMA_STATISTIC_COUNTERS,
+	ECORE_HSI_DEF_MAX_QM_GLOBAL_RLS,
+	ECORE_HSI_DEF_MAX_PBF_CMD_LINES,
+	ECORE_HSI_DEF_MAX_BTB_BLOCKS,
+	ECORE_NUM_HSI_DEFS
+};
+
+u32 ecore_get_hsi_def_val(struct ecore_dev *p_dev,
+			  enum ecore_hsi_def_type type);
+
+#define NUM_OF_VFS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_VFS)
+#define NUM_OF_L2_QUEUES(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_L2_QUEUES)
+#define NUM_OF_PORTS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_PORTS)
+#define NUM_OF_SBS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_SB_PER_PATH)
+#define NUM_OF_ENG_PFS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_PFS)
+#define NUM_OF_VPORTS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_NUM_VPORTS)
+#define NUM_OF_RSS_ENGINES(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_NUM_ETH_RSS_ENGINE)
+#define NUM_OF_QM_TX_QUEUES(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_QM_TX_QUEUES)
+#define NUM_OF_PXP_ILT_RECORDS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_NUM_PXP_ILT_RECORDS)
+#define NUM_OF_RDMA_STATISTIC_COUNTERS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_NUM_RDMA_STATISTIC_COUNTERS)
+#define NUM_OF_QM_GLOBAL_RLS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_QM_GLOBAL_RLS)
+#define NUM_OF_PBF_CMD_LINES(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_PBF_CMD_LINES)
+#define NUM_OF_BTB_BLOCKS(dev) \
+	ecore_get_hsi_def_val(dev, ECORE_HSI_DEF_MAX_BTB_BLOCKS)
 
 #define CRC8_TABLE_SIZE 256
 
@@ -948,7 +989,6 @@ static OSAL_INLINE u8 ecore_concrete_to_sw_fid(u32 concrete_fid)
 }
 
 #define PKT_LB_TC 9
-#define MAX_NUM_VOQS_E4 20
 
 int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate);
 void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev,
@@ -1023,4 +1063,9 @@ enum _ecore_status_t ecore_all_ppfids_wr(struct ecore_hwfn *p_hwfn,
 enum _ecore_status_t ecore_llh_dump_ppfid(struct ecore_dev *p_dev, u8 ppfid);
 enum _ecore_status_t ecore_llh_dump_all(struct ecore_dev *p_dev);
 
+#define TSTORM_QZONE_START	PXP_VF_BAR0_START_SDM_ZONE_A
+
+#define MSTORM_QZONE_START(dev) \
+	(TSTORM_QZONE_START + (TSTORM_QZONE_SIZE * NUM_OF_L2_QUEUES(dev)))
+
 #endif /* __ECORE_H */
drivers/net/qede/base/ecore_cxt.c +288 -209

954 lines not on this page · raw message

drivers/net/qede/base/ecore_cxt.h +12 -0
index f8c955cac..55f08027d 100644
@@ -22,6 +22,18 @@ enum ecore_cxt_elem_type {
 	ECORE_ELEM_TASK
 };
 
+enum ilt_clients {
+	ILT_CLI_CDUC,
+	ILT_CLI_CDUT,
+	ILT_CLI_QM,
+	ILT_CLI_TM,
+	ILT_CLI_SRC,
+	ILT_CLI_TSDM,
+	ILT_CLI_RGFS,
+	ILT_CLI_TGFS,
+	ILT_CLI_MAX
+};
+
 u32 ecore_cxt_get_proto_cid_count(struct ecore_hwfn *p_hwfn,
 				  enum protocol_type type,
 				  u32 *vf_cid);
drivers/net/qede/base/ecore_dcbx.c +3 -2
index b82ca49ff..ccd4383bb 100644
@@ -310,8 +310,9 @@ ecore_dcbx_process_tlv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
 			continue;
 
 		/* if no app tlv was present, don't override in FW */
-		ecore_dcbx_update_app_info(p_data, p_hwfn, p_ptt, false,
-					   priority, tc, type);
+		ecore_dcbx_update_app_info(p_data, p_hwfn, p_ptt,
+					  p_data->arr[DCBX_PROTOCOL_ETH].enable,
+					  priority, tc, type);
 	}
 
 	return ECORE_SUCCESS;
drivers/net/qede/base/ecore_dev.c +342 -244

1,034 lines not on this page · raw message

drivers/net/qede/base/ecore_init_fw_funcs.c +346 -335

858 lines not on this page · raw message

drivers/net/qede/base/ecore_init_fw_funcs.h +79 -28

107 lines not on this page · raw message

drivers/net/qede/base/ecore_init_ops.c +11 -4
index ad8570a08..ea964ea2f 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_init_ops.h +1 -1
index 21e433309..0cbf293b3 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_int.c +83 -46

129 lines not on this page · raw message

drivers/net/qede/base/ecore_int_api.h +8 -3
index abea2a716..d7b6b86cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_l2.c +4 -6
index 5dcdc84fc..b20d83762 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_l2_api.h +2 -0
index acde81fad..bebf412ed 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_mcp.c +173 -114

287 lines not on this page · raw message

drivers/net/qede/base/ecore_mcp.h +7 -2
index 2c052b7fa..185cc2339 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_proto_if.h +1 -0
index f91b25e20..64509f7cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_sp_commands.c +10 -5
index 49a5ff552..9860a62b5 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/base/ecore_spq.c +33 -20

53 lines not on this page · raw message

drivers/net/qede/base/ecore_sriov.c +111 -46

157 lines not on this page · raw message

drivers/net/qede/base/ecore_vf.c +7 -11
index 3ba6a0cf2..24846cfb5 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_ethdev.h +1 -1
index b5f93e9fa..559638508 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_main.c +1 -1
index 8a108f99c..c9caec645 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_rxtx.c +2 -2
index 40a246229..a28dd0a07 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.18.0

Part of the diff is not shown here. View the raw message.

#22 lore raw

Re: [dpdk-dev] [PATCH v2 8/9] net/qede/base: update the FW to 8.40.25.0

Quoted 25 lines · Rasesh Mody

This patch updates the FW to 8.40.25.0 and corresponding base driver changes. It also updates the PMD version to 2.11.0.1. The FW updates consists of enhancements and fixes as described below.

- VF RX queue start ramrod can get stuck due to completion error. Return EQ completion with error, when fail to load VF data. Use VF FID in RX queue start ramrod
- Fix big receive buffer initialization for 100G to address failure leading to BRB hardware assertion
- GRE tunnel traffic doesn't run when non-L2 ethernet protocol is enabled, fix FW to not forward tunneled SYN packets to LL2.
- Fix the FW assert that is caused during vport_update when tx-switching is enabled
- Add initial FW support for VF Representors
- Add ecore_get_hsi_def_val() API to get default HSI values
- Move following from .c to .h files:
TSTORM_QZONE_START and MSTORM_QZONE_START
enum ilt_clients
renamed struct ecore_dma_mem to phys_mem_desc and moved
- Add ecore_cxt_set_cli() and ecore_cxt_set_blk() APIs to set client config and block details
- Use SET_FIELD() macro where appropriate
- Address spell check and code alignment issues

<...>

drivers/net/qede/base/ecore_init_fw_funcs.c static u8 ecore_calc_cdu_validation_byte(u8 conn_type, u8 region, u32 cid) · line 1974

Quoted 9 lines
drivers/net/qede/base/ecore_init_fw_funcs.c +3 -2
-void ecore_calc_session_ctx_validation(void *p_ctx_mem, u16 ctx_size,
+void ecore_calc_session_ctx_validation(struct ecore_hwfn *p_hwfn,
+				       void *p_ctx_mem, u16 ctx_size,
 				       u8 ctx_type, u32 cid)
 {
 	u8 *x_val_ptr, *t_val_ptr, *u_val_ptr, *p_ctx;
 
-	p_ctx = (u8 *)p_ctx_mem;
+	p_ctx = (u8 * const)p_ctx_mem;

This is causing build error with icc [1], I will remove 'const' while merging.

[1]
error #191: type qualifier is meaningless on cast type

<...>

drivers/net/qede/base/ecore_init_fw_funcs.c void ecore_calc_task_ctx_validation(void *p_ctx_mem, u16 ctx_size, u8 ctx_type, · line 2009

Quoted 9 lines
drivers/net/qede/base/ecore_init_fw_funcs.c +3 -2
-void ecore_memset_session_ctx(void *p_ctx_mem, u32 ctx_size, u8 ctx_type)
+void ecore_memset_session_ctx(struct ecore_hwfn *p_hwfn, void *p_ctx_mem,
+			      u32 ctx_size, u8 ctx_type)
 {
 	u8 *x_val_ptr, *t_val_ptr, *u_val_ptr, *p_ctx;
 	u8 x_val, t_val, u_val;
 
-	p_ctx = (u8 *)p_ctx_mem;
+	p_ctx = (u8 * const)p_ctx_mem;

Ditto

#23 lore raw

PATCH v2 9/9 net/qede: print adapter info during init failure

In reply to Rasesh Mody

Dump the info logs banner with available information in case of device initialization failure.

---
 drivers/net/qede/qede_ethdev.c | 81 ++++++++++++++++++++++------------
 drivers/net/qede/qede_ethdev.h | 19 +++++---
 2 files changed, 67 insertions(+), 33 deletions(-)
drivers/net/qede/qede_ethdev.c +54 -27
index 0c9f6590e..53fdfde9a 100644
@@ -278,30 +278,44 @@ static void qede_print_adapter_info(struct qede_dev *qdev)
 {
 	struct ecore_dev *edev = &qdev->edev;
 	struct qed_dev_info *info = &qdev->dev_info.common;
-	static char drv_ver[QEDE_PMD_DRV_VER_STR_SIZE];
 	static char ver_str[QEDE_PMD_DRV_VER_STR_SIZE];
 
-	DP_INFO(edev, "*********************************\n");
-	DP_INFO(edev, " DPDK version:%s\n", rte_version());
-	DP_INFO(edev, " Chip details : %s %c%d\n",
+	DP_INFO(edev, "**************************************************\n");
+	DP_INFO(edev, " DPDK version\t\t\t: %s\n", rte_version());
+	DP_INFO(edev, " Chip details\t\t\t: %s %c%d\n",
 		  ECORE_IS_BB(edev) ? "BB" : "AH",
 		  'A' + edev->chip_rev,
 		  (int)edev->chip_metal);
-	snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%d.%d.%d.%d",
-		 info->fw_major, info->fw_minor, info->fw_rev, info->fw_eng);
-	snprintf(drv_ver, QEDE_PMD_DRV_VER_STR_SIZE, "%s_%s",
-		 ver_str, QEDE_PMD_VERSION);
-	DP_INFO(edev, " Driver version : %s\n", drv_ver);
-	DP_INFO(edev, " Firmware version : %s\n", ver_str);
+	snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%s",
+		 QEDE_PMD_DRV_VERSION);
+	DP_INFO(edev, " Driver version\t\t\t: %s\n", ver_str);
+
+	snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%s",
+		 QEDE_PMD_BASE_VERSION);
+	DP_INFO(edev, " Base version\t\t\t: %s\n", ver_str);
+
+	if (!IS_VF(edev))
+		snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%s",
+			 QEDE_PMD_FW_VERSION);
+	else
+		snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%d.%d.%d.%d",
+			 info->fw_major, info->fw_minor,
+			 info->fw_rev, info->fw_eng);
+	DP_INFO(edev, " Firmware version\t\t\t: %s\n", ver_str);
 
 	snprintf(ver_str, MCP_DRV_VER_STR_SIZE,
 		 "%d.%d.%d.%d",
-		(info->mfw_rev >> 24) & 0xff,
-		(info->mfw_rev >> 16) & 0xff,
-		(info->mfw_rev >> 8) & 0xff, (info->mfw_rev) & 0xff);
-	DP_INFO(edev, " Management Firmware version : %s\n", ver_str);
-	DP_INFO(edev, " Firmware file : %s\n", qede_fw_file);
-	DP_INFO(edev, "*********************************\n");
+		 (info->mfw_rev & QED_MFW_VERSION_3_MASK) >>
+		 QED_MFW_VERSION_3_OFFSET,
+		 (info->mfw_rev & QED_MFW_VERSION_2_MASK) >>
+		 QED_MFW_VERSION_2_OFFSET,
+		 (info->mfw_rev & QED_MFW_VERSION_1_MASK) >>
+		 QED_MFW_VERSION_1_OFFSET,
+		 (info->mfw_rev & QED_MFW_VERSION_0_MASK) >>
+		 QED_MFW_VERSION_0_OFFSET);
+	DP_INFO(edev, " Management Firmware version\t: %s\n", ver_str);
+	DP_INFO(edev, " Firmware file\t\t\t: %s\n", qede_fw_file);
+	DP_INFO(edev, "**************************************************\n");
 }
 
 static void qede_reset_queue_stats(struct qede_dev *qdev, bool xstats)
@@ -2427,7 +2441,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	qed_ops = qed_get_eth_ops();
 	if (!qed_ops) {
 		DP_ERR(edev, "Failed to get qed_eth_ops_pass\n");
-		return -EINVAL;
+		rc = -EINVAL;
+		goto err;
 	}
 
 	DP_INFO(edev, "Starting qede probe\n");
@@ -2435,7 +2450,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 				    dp_level, is_vf);
 	if (rc != 0) {
 		DP_ERR(edev, "qede probe failed rc %d\n", rc);
-		return -ENODEV;
+		rc = -ENODEV;
+		goto err;
 	}
 	qede_update_pf_params(edev);
 
@@ -2456,7 +2472,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
 	if (rte_intr_enable(&pci_dev->intr_handle)) {
 		DP_ERR(edev, "rte_intr_enable() failed\n");
-		return -ENODEV;
+		rc = -ENODEV;
+		goto err;
 	}
 
 	/* Start the Slowpath-process */
@@ -2491,7 +2508,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 		if (rc != 0) {
 			DP_ERR(edev, "Unable to start periodic"
 				     " timer rc %d\n", rc);
-			return -EINVAL;
+			rc = -EINVAL;
+			goto err;
 		}
 	}
 
@@ -2500,7 +2518,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 		DP_ERR(edev, "Cannot start slowpath rc = %d\n", rc);
 		rte_eal_alarm_cancel(qede_poll_sp_sb_cb,
 				     (void *)eth_dev);
-		return -ENODEV;
+		rc = -ENODEV;
+		goto err;
 	}
 
 	rc = qed_ops->fill_dev_info(edev, &dev_info);
@@ -2510,11 +2529,17 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 		qed_ops->common->remove(edev);
 		rte_eal_alarm_cancel(qede_poll_sp_sb_cb,
 				     (void *)eth_dev);
-		return -ENODEV;
+		rc = -ENODEV;
+		goto err;
 	}
 
 	qede_alloc_etherdev(adapter, &dev_info);
 
+	if (do_once) {
+		qede_print_adapter_info(adapter);
+		do_once = false;
+	}
+
 	adapter->ops->common->set_name(edev, edev->name);
 
 	if (!is_vf)
@@ -2571,11 +2596,6 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
 	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
 
-	if (do_once) {
-		qede_print_adapter_info(adapter);
-		do_once = false;
-	}
-
 	/* Bring-up the link */
 	qede_dev_set_link_state(eth_dev, true);
 
@@ -2621,6 +2641,13 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	DP_INFO(edev, "Device initialized\n");
 
 	return 0;
+
+err:
+	if (do_once) {
+		qede_print_adapter_info(adapter);
+		do_once = false;
+	}
+	return rc;
 }
 
 static int qedevf_eth_dev_init(struct rte_eth_dev *eth_dev)
drivers/net/qede/qede_ethdev.h +13 -6
index 559638508..1ac2d086a 100644
@@ -42,20 +42,27 @@
 #define qede_stringify(x...)		qede_stringify1(x)
 
 /* Driver versions */
+#define QEDE_PMD_DRV_VER_STR_SIZE NAME_SIZE /* 128 */
 #define QEDE_PMD_VER_PREFIX		"QEDE PMD"
 #define QEDE_PMD_VERSION_MAJOR		2
 #define QEDE_PMD_VERSION_MINOR	        11
 #define QEDE_PMD_VERSION_REVISION       0
 #define QEDE_PMD_VERSION_PATCH	        1
 
-#define QEDE_PMD_VERSION qede_stringify(QEDE_PMD_VERSION_MAJOR) "."     \
-			 qede_stringify(QEDE_PMD_VERSION_MINOR) "."     \
-			 qede_stringify(QEDE_PMD_VERSION_REVISION) "."  \
-			 qede_stringify(QEDE_PMD_VERSION_PATCH)
+#define QEDE_PMD_DRV_VERSION qede_stringify(QEDE_PMD_VERSION_MAJOR) "."     \
+			     qede_stringify(QEDE_PMD_VERSION_MINOR) "."     \
+			     qede_stringify(QEDE_PMD_VERSION_REVISION) "."  \
+			     qede_stringify(QEDE_PMD_VERSION_PATCH)
 
-#define QEDE_PMD_DRV_VER_STR_SIZE NAME_SIZE
-#define QEDE_PMD_VER_PREFIX "QEDE PMD"
+#define QEDE_PMD_BASE_VERSION qede_stringify(ECORE_MAJOR_VERSION) "."       \
+			      qede_stringify(ECORE_MINOR_VERSION) "."       \
+			      qede_stringify(ECORE_REVISION_VERSION) "."    \
+			      qede_stringify(ECORE_ENGINEERING_VERSION)
 
+#define QEDE_PMD_FW_VERSION qede_stringify(FW_MAJOR_VERSION) "."            \
+			    qede_stringify(FW_MINOR_VERSION) "."            \
+			    qede_stringify(FW_REVISION_VERSION) "."         \
+			    qede_stringify(FW_ENGINEERING_VERSION)
 
 #define QEDE_RSS_INDIR_INITED     (1 << 0)
 #define QEDE_RSS_KEY_INITED       (1 << 1)
Signature · 1 line
2.18.0