Skip to content

Commit 5db0e09

Browse files
Vasundhara Volamdavem330
authored andcommitted
bnxt_en: Fix enables field in HWRM_QUEUE_COS2BW_CFG request
In HWRM_QUEUE_COS2BW_CFG request, enables field should have the bits set only for the queue ids which are having the valid parameters. This causes firmware to return error when the TC to hardware CoS queue mapping is not 1:1 during DCBNL ETS setup. Fixes: 2e8ef77 ("bnxt_en: Add TC to hardware QoS queue mapping logic.") Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent dbe80d4 commit 5db0e09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ static int bnxt_hwrm_queue_cos2bw_cfg(struct bnxt *bp, struct ieee_ets *ets,
9898

9999
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_QUEUE_COS2BW_CFG, -1, -1);
100100
for (i = 0; i < max_tc; i++) {
101-
u8 qidx;
101+
u8 qidx = bp->tc_to_qidx[i];
102102

103103
req.enables |= cpu_to_le32(
104-
QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID0_VALID << i);
104+
QUEUE_COS2BW_CFG_REQ_ENABLES_COS_QUEUE_ID0_VALID <<
105+
qidx);
105106

106107
memset(&cos2bw, 0, sizeof(cos2bw));
107-
qidx = bp->tc_to_qidx[i];
108108
cos2bw.queue_id = bp->q_info[qidx].queue_id;
109109
if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_STRICT) {
110110
cos2bw.tsa =

0 commit comments

Comments
 (0)