Skip to content

Commit

Permalink
net/bnxt: fix checking result of HWRM command
Browse files Browse the repository at this point in the history
[ upstream commit 5151df1 ]

HWRM_CHECK_RESULT macro is used to check the status of HWRM commands.

Fixes: 18c2854 ("net/bnxt: configure a default VF VLAN")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
Kalesh AP authored and kevintraynor committed Aug 28, 2019
1 parent 7ce0d38 commit 7027e5d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/net/bnxt/bnxt_hwrm.c
Expand Up @@ -2657,14 +2657,7 @@ int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf)
HWRM_PREP(req, FUNC_QCFG, BNXT_USE_CHIMP_MB);
req.fid = rte_cpu_to_le_16(bp->pf.vf_info[vf].fid);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
if (rc) {
PMD_DRV_LOG(ERR, "hwrm_func_qcfg failed rc:%d\n", rc);
return -1;
} else if (resp->error_code) {
rc = rte_le_to_cpu_16(resp->error_code);
PMD_DRV_LOG(ERR, "hwrm_func_qcfg error %d\n", rc);
return -1;
}
HWRM_CHECK_RESULT();
rc = rte_le_to_cpu_16(resp->vlan);

HWRM_UNLOCK();
Expand Down

0 comments on commit 7027e5d

Please sign in to comment.