summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@broadcom.com>2019-11-18 14:23:45 -0800
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-20 17:36:06 +0100
commit89a0deb866dc42ead92b79e6e7159622e1ab8490 (patch)
treef9ffb776258ada8ee4afad0aceaef61fbf02e2de
parentc1b22c18decc0f90d80d8d6736cd48468c99fe46 (diff)
downloaddpdk-next-net-intel-89a0deb866dc42ead92b79e6e7159622e1ab8490.zip
dpdk-next-net-intel-89a0deb866dc42ead92b79e6e7159622e1ab8490.tar.gz
dpdk-next-net-intel-89a0deb866dc42ead92b79e6e7159622e1ab8490.tar.xz
net/bnxt: fix resource qcaps with older FW
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: edafb57ba4a1 ("net/bnxt: fix VF resource allocation") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 2cba007..1d3732e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -692,7 +692,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;
}
/* VNIC cap covers capability of all VNICs. So no need to pass vnic_id */
@@ -901,7 +906,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);