[5/5] net/bnxt: fix incorrect COS queue mapping

Message ID 20191030080438.27530-6-kalesh-anakkur.purayil@broadcom.com (mailing list archive)
State Superseded, archived
Delegated to: Ajit Khaparde
Headers
Series bnxt patchset with bug fixes |

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/travis-robot warning Travis build: failed
ci/checkpatch success coding style OK

Commit Message

Kalesh A P Oct. 30, 2019, 8:04 a.m. UTC
From: Ajit Khaparde <ajit.khaparde@broadcom.com>

While issuing hwrm_queue_qportcfg command, we are setting the
drv_qmap_cap bit which is causing the firmware to return incorrect COS
queue mapping. This bit is not required when COS classification is enabled.

Fixes: 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index daed4ee..ab6cb1d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1217,8 +1217,9 @@  int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)
 	HWRM_PREP(req, QUEUE_QPORTCFG, BNXT_USE_CHIMP_MB);
 
 	req.flags = rte_cpu_to_le_32(dir);
-	/* HWRM Version >= 1.9.1 */
-	if (bp->hwrm_spec_code >= HWRM_VERSION_1_9_1)
+	/* HWRM Version >= 1.9.1 only if COS Classification is not required. */
+	if (bp->hwrm_spec_code >= HWRM_VERSION_1_9_1 &&
+	    !(bp->vnic_cap_flags & BNXT_VNIC_CAP_COS_CLASSIFY))
 		req.drv_qmap_cap =
 			HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_ENABLED;
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);