Skip to content

Commit

Permalink
net/bnxt: fix resource qcaps with older FW
Browse files Browse the repository at this point in the history
[ upstream commit 89a0deb ]

On some old versions of FW, bnxt_hwrm_func_resc_qcaps can return an
error. This is because the command was not implemented completely
in FW till the subsequent version. Ignore the error and continue with
the driver initialization.

Fixes: edafb57 ("net/bnxt: fix VF resource allocation")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
ajitkhaparde authored and kevintraynor committed Dec 11, 2019
1 parent b451f20 commit 65bcaa3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/net/bnxt/bnxt_hwrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,12 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
bp->flags |= BNXT_FLAG_NEW_RM;
}

return rc;
/* On older FW,
* bnxt_hwrm_func_resc_qcaps can fail and cause init failure.
* But the error can be ignored. Return success.
*/

return 0;
}

int bnxt_hwrm_func_reset(struct bnxt *bp)
Expand Down Expand Up @@ -764,7 +769,7 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)

rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);

HWRM_CHECK_RESULT();
HWRM_CHECK_RESULT_SILENT();

if (BNXT_VF(bp)) {
bp->max_rsscos_ctx = rte_le_to_cpu_16(resp->max_rsscos_ctx);
Expand Down

0 comments on commit 65bcaa3

Please sign in to comment.