net/bnxt: enable port MAC qcfg command for trusted VF
authorVenkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Thu, 2 Jul 2020 23:28:27 +0000 (16:28 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 7 Jul 2020 21:38:27 +0000 (23:38 +0200)
Issue HWRM_PORT_MAC_QCFG command on trusted vf to fetch the port count.

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_hwrm.c

index 2605ef0..6ade32d 100644 (file)
@@ -3194,14 +3194,14 @@ int bnxt_hwrm_port_mac_qcfg(struct bnxt *bp)
 
        bp->port_svif = BNXT_SVIF_INVALID;
 
-       if (!BNXT_PF(bp))
+       if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
                return 0;
 
        HWRM_PREP(&req, HWRM_PORT_MAC_QCFG, BNXT_USE_CHIMP_MB);
 
        rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
-       HWRM_CHECK_RESULT();
+       HWRM_CHECK_RESULT_SILENT();
 
        port_svif_info = rte_le_to_cpu_16(resp->port_svif_info);
        if (port_svif_info &