Blame SOURCES/_PATCH_RHEL-7_07-12_bnxt_en_Fix_statistics_context_reservation_logic.patch

8fbaf1
Date: Wed,  5 Jun 2019 13:55:26 -0400
8fbaf1
From: Jonathan Toppins <jtoppins@redhat.com>
8fbaf1
To: rhkernel-list@redhat.com
8fbaf1
Cc: darcari@redhat.com, linville@redhat.com
8fbaf1
Subject: [PATCH RHEL-7 07/12] bnxt_en: Fix statistics context reservation
8fbaf1
 logic.
8fbaf1
8fbaf1
In an earlier commit that fixes the number of stats contexts to
8fbaf1
reserve for the RDMA driver, we added a function parameter to pass in
8fbaf1
the number of stats contexts to all the relevant functions.  The passed
8fbaf1
in parameter should have been used to set the enables field of the
8fbaf1
firmware message.
8fbaf1
8fbaf1
Fixes: 780baad44f0f ("bnxt_en: Reserve 1 stat_ctx for RDMA driver.")
8fbaf1
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
8fbaf1
Signed-off-by: David S. Miller <davem@davemloft.net>
8fbaf1
(cherry picked from commit 3f93cd3f098e284c851acb89265ebe35b994a5c8)
8fbaf1
Bugzilla: 1715161
8fbaf1
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=21964229
8fbaf1
Tested: build and boot
8fbaf1
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
8fbaf1
---
8fbaf1
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 14 ++++++--------
8fbaf1
 1 file changed, 6 insertions(+), 8 deletions(-)
8fbaf1
8fbaf1
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
8fbaf1
index a301f53f01aa..11fbcbb8d67a 100644
8fbaf1
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
8fbaf1
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
8fbaf1
@@ -5301,17 +5301,16 @@ __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, struct hwrm_func_cfg_input *req,
8fbaf1
 	req->num_tx_rings = cpu_to_le16(tx_rings);
8fbaf1
 	if (BNXT_NEW_RM(bp)) {
8fbaf1
 		enables |= rx_rings ? FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS : 0;
8fbaf1
+		enables |= stats ? FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
8fbaf1
 		if (bp->flags & BNXT_FLAG_CHIP_P5) {
8fbaf1
 			enables |= cp_rings ? FUNC_CFG_REQ_ENABLES_NUM_MSIX : 0;
8fbaf1
 			enables |= tx_rings + ring_grps ?
8fbaf1
-				   FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
8fbaf1
-				   FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
8fbaf1
+				   FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
8fbaf1
 			enables |= rx_rings ?
8fbaf1
 				FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
8fbaf1
 		} else {
8fbaf1
 			enables |= cp_rings ?
8fbaf1
-				   FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
8fbaf1
-				   FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
8fbaf1
+				   FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
8fbaf1
 			enables |= ring_grps ?
8fbaf1
 				   FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS |
8fbaf1
 				   FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
8fbaf1
@@ -5351,14 +5350,13 @@ __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp,
8fbaf1
 	enables |= tx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_TX_RINGS : 0;
8fbaf1
 	enables |= rx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_RX_RINGS |
8fbaf1
 			      FUNC_VF_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
8fbaf1
+	enables |= stats ? FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
8fbaf1
 	if (bp->flags & BNXT_FLAG_CHIP_P5) {
8fbaf1
 		enables |= tx_rings + ring_grps ?
8fbaf1
-			   FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
8fbaf1
-			   FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
8fbaf1
+			   FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
8fbaf1
 	} else {
8fbaf1
 		enables |= cp_rings ?
8fbaf1
-			   FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
8fbaf1
-			   FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
8fbaf1
+			   FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
8fbaf1
 		enables |= ring_grps ?
8fbaf1
 			   FUNC_VF_CFG_REQ_ENABLES_NUM_HW_RING_GRPS : 0;
8fbaf1
 	}
8fbaf1
-- 
8fbaf1
2.16.4
8fbaf1
8fbaf1