net/bnxt: fix port MAC query on VF

HWRM_PORT_MAC_QCFG is not supported on a VF. Added a PF check
in bnxt_hwrm_port_mac_qcfg() to prevent the probe failure on a VF.

Fixes: f6e250d21a ("net/bnxt: fetch SVIF information from firmware")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
This commit is contained in:
Kalesh AP 2020-04-21 14:33:51 -07:00 committed by Ferruh Yigit
parent f02ea89fcb
commit 24fd2eea9f

View File

@ -3094,6 +3094,9 @@ int bnxt_hwrm_port_mac_qcfg(struct bnxt *bp)
bp->port_svif = BNXT_SVIF_INVALID;
if (!BNXT_PF(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);