DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, stable@dpdk.org,
	Somnath Kotur <somnath.kotur@broadcom.com>
Subject: [dpdk-dev] [PATCH 1/3] net/bnxt: fix to ignore resource qcaps error with older FW
Date: Tue, 19 Nov 2019 10:56:36 -0800	[thread overview]
Message-ID: <20191119185638.78740-2-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20191119185638.78740-1-ajit.khaparde@broadcom.com>

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>
---
 drivers/net/bnxt/bnxt_hwrm.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 2cba007ea..1d3732eee 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);
-- 
2.21.0 (Apple Git-122.2)


  reply	other threads:[~2019-11-19 18:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 18:56 [dpdk-dev] [PATCH 0/3] bnxt patches Ajit Khaparde
2019-11-19 18:56 ` Ajit Khaparde [this message]
2019-11-19 18:56 ` [dpdk-dev] [PATCH 2/3] net/bnxt: fix jumbo frame configuration in firmware Ajit Khaparde
2019-11-19 18:56 ` [dpdk-dev] [PATCH 3/3] doc: update release notes for Broadcom PMD Ajit Khaparde
2019-11-20  9:34   ` Ferruh Yigit
2019-11-20  9:45     ` Ferruh Yigit
2019-11-20 16:55       ` Ajit Khaparde
2019-11-21 23:34       ` [dpdk-dev] [PATCH v2 1/3] doc: update bnxt feature list Ajit Khaparde
2019-11-21 23:34         ` [dpdk-dev] [PATCH v2 2/3] doc: update release notes for Broadcom PMD Ajit Khaparde
2019-11-21 23:34         ` [dpdk-dev] [PATCH v2 3/3] net/bnxt: fix to free all the vnics during port stop Ajit Khaparde
2019-11-21 23:44           ` Ajit Khaparde
2019-11-19 19:01 ` [dpdk-dev] [PATCH 0/3] bnxt patches Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191119185638.78740-2-ajit.khaparde@broadcom.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=somnath.kotur@broadcom.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).