DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com
Subject: [dpdk-dev] [PATCH 3/6] net/bnxt: fix request for hot reset support
Date: Tue, 10 Dec 2019 20:35:26 +0530	[thread overview]
Message-ID: <20191210150529.27922-4-kalesh-anakkur.purayil@broadcom.com> (raw)
In-Reply-To: <20191210150529.27922-1-kalesh-anakkur.purayil@broadcom.com>

From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

During the registration process, the drivers must publish
"HOT_RESET_SUPPORTED" capability to the core firmware only
if core firmware is capable of Hot Reset.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt.h      | 1 +
 drivers/net/bnxt/bnxt_hwrm.c | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index e259c82..f9e4d76 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -517,6 +517,7 @@ struct bnxt {
 #define BNXT_FLAG_INIT_DONE			BIT(24)
 #define BNXT_FLAG_FW_CAP_ONE_STEP_TX_TS		BIT(25)
 #define BNXT_FLAG_ADV_FLOW_MGMT			BIT(26)
+#define BNXT_FLAG_FW_CAP_HOT_RESET		BIT(27)
 #define BNXT_PF(bp)		(!((bp)->flags & BNXT_FLAG_VF))
 #define BNXT_VF(bp)		((bp)->flags & BNXT_FLAG_VF)
 #define BNXT_NPAR(bp)		((bp)->port_partition_type)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b1f908e..d30da9b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -672,6 +672,11 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	else
 		bp->flags &= ~BNXT_FLAG_FW_CAP_ERR_RECOVER_RELOAD;
 
+	if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_HOT_RESET_CAPABLE)
+		bp->flags |= BNXT_FLAG_FW_CAP_HOT_RESET;
+	else
+		bp->flags &= ~BNXT_FLAG_FW_CAP_HOT_RESET;
+
 	HWRM_UNLOCK();
 
 	return rc;
@@ -756,7 +761,8 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp)
 	if (bp->flags & BNXT_FLAG_REGISTERED)
 		return 0;
 
-	flags = HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_HOT_RESET_SUPPORT;
+	if (bp->flags & BNXT_FLAG_FW_CAP_HOT_RESET)
+		flags = HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_HOT_RESET_SUPPORT;
 	if (bp->flags & BNXT_FLAG_FW_CAP_ERROR_RECOVERY)
 		flags |= HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_ERROR_RECOVERY_SUPPORT;
 
-- 
2.10.1


  parent reply	other threads:[~2019-12-10 14:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10 15:05 [dpdk-dev] [PATCH 0/6] bnxt patchset Kalesh A P
2019-12-10 15:05 ` [dpdk-dev] [PATCH 1/6] net/bnxt: restore mac filters during reset recovery Kalesh A P
2019-12-10 15:05 ` [dpdk-dev] [PATCH 2/6] net/bnxt: restore vlan " Kalesh A P
2019-12-10 15:05 ` Kalesh A P [this message]
2019-12-10 15:05 ` [dpdk-dev] [PATCH 4/6] net/bnxt: remove unnecessary macro for unused variables Kalesh A P
2019-12-10 15:05 ` [dpdk-dev] [PATCH 5/6] net/bnxt: reset filter indices on free Kalesh A P
2019-12-10 15:05 ` [dpdk-dev] [PATCH 6/6] net/bnxt: add a field for fw capabilities Kalesh A P
2019-12-13 22:41 ` [dpdk-dev] [PATCH 0/6] bnxt patchset 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=20191210150529.27922-4-kalesh-anakkur.purayil@broadcom.com \
    --to=kalesh-anakkur.purayil@broadcom.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /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).