]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
bnxt_en: Fix statistics context reservation logic.
authorMichael Chan <michael.chan@broadcom.com>
Fri, 26 Apr 2019 02:31:54 +0000 (22:31 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Apr 2019 21:00:19 +0000 (17:00 -0400)
In an earlier commit that fixes the number of stats contexts to
reserve for the RDMA driver, we added a function parameter to pass in
the number of stats contexts to all the relevant functions.  The passed
in parameter should have been used to set the enables field of the
firmware message.

Fixes: 780baad44f0f ("bnxt_en: Reserve 1 stat_ctx for RDMA driver.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index a9172b2feb1d1cba2f853cbf69b6112b11e939a0..b6cb7b8ceab97212d387d6abca73b0a8aea1c0bd 100644 (file)
@@ -5315,17 +5315,16 @@ __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, struct hwrm_func_cfg_input *req,
        req->num_tx_rings = cpu_to_le16(tx_rings);
        if (BNXT_NEW_RM(bp)) {
                enables |= rx_rings ? FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS : 0;
+               enables |= stats ? FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
                if (bp->flags & BNXT_FLAG_CHIP_P5) {
                        enables |= cp_rings ? FUNC_CFG_REQ_ENABLES_NUM_MSIX : 0;
                        enables |= tx_rings + ring_grps ?
-                                  FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
-                                  FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
+                                  FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
                        enables |= rx_rings ?
                                FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
                } else {
                        enables |= cp_rings ?
-                                  FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
-                                  FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
+                                  FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
                        enables |= ring_grps ?
                                   FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS |
                                   FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
@@ -5365,14 +5364,13 @@ __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp,
        enables |= tx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_TX_RINGS : 0;
        enables |= rx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_RX_RINGS |
                              FUNC_VF_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
+       enables |= stats ? FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
        if (bp->flags & BNXT_FLAG_CHIP_P5) {
                enables |= tx_rings + ring_grps ?
-                          FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
-                          FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
+                          FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
        } else {
                enables |= cp_rings ?
-                          FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
-                          FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
+                          FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
                enables |= ring_grps ?
                           FUNC_VF_CFG_REQ_ENABLES_NUM_HW_RING_GRPS : 0;
        }