Skip to content

Commit 3f93cd3

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Fix statistics context reservation logic.
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: 780baad ("bnxt_en: Reserve 1 stat_ctx for RDMA driver.") Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ad361ad commit 3f93cd3

File tree

1 file changed

+6
-8
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+6
-8
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5315,17 +5315,16 @@ __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, struct hwrm_func_cfg_input *req,
53155315
req->num_tx_rings = cpu_to_le16(tx_rings);
53165316
if (BNXT_NEW_RM(bp)) {
53175317
enables |= rx_rings ? FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS : 0;
5318+
enables |= stats ? FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
53185319
if (bp->flags & BNXT_FLAG_CHIP_P5) {
53195320
enables |= cp_rings ? FUNC_CFG_REQ_ENABLES_NUM_MSIX : 0;
53205321
enables |= tx_rings + ring_grps ?
5321-
FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
5322-
FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
5322+
FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
53235323
enables |= rx_rings ?
53245324
FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
53255325
} else {
53265326
enables |= cp_rings ?
5327-
FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
5328-
FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
5327+
FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
53295328
enables |= ring_grps ?
53305329
FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS |
53315330
FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
@@ -5365,14 +5364,13 @@ __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp,
53655364
enables |= tx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_TX_RINGS : 0;
53665365
enables |= rx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_RX_RINGS |
53675366
FUNC_VF_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
5367+
enables |= stats ? FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
53685368
if (bp->flags & BNXT_FLAG_CHIP_P5) {
53695369
enables |= tx_rings + ring_grps ?
5370-
FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
5371-
FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
5370+
FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
53725371
} else {
53735372
enables |= cp_rings ?
5374-
FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
5375-
FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
5373+
FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
53765374
enables |= ring_grps ?
53775375
FUNC_VF_CFG_REQ_ENABLES_NUM_HW_RING_GRPS : 0;
53785376
}

0 commit comments

Comments
 (0)