DPDK patches and discussions
 help / color / mirror / Atom feed
From: Somnath Kotur <somnath.kotur@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Somnath Kotur <somnath.kotur@broadcom.com>
Subject: [dpdk-dev] [PATCH] net/bnxt: fix to release lock in error path of stop and close op
Date: Wed, 13 Jan 2021 10:00:11 +0530
Message-ID: <20210113043011.6291-1-somnath.kotur@broadcom.com> (raw)

err_recovery_lock needs to be released before returning in
stop and close_op if FW_RESET flag is set.

Fixes: 647ca0b35830 ("net/bnxt: check chip reset in dev stop and close")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 74b0f3d1dc..4d6c0a15cd 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1374,6 +1374,7 @@ static int bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	if (bp->flags & BNXT_FLAG_FW_RESET) {
 			    "Adapter recovering from error..Please retry\n");
+		pthread_mutex_unlock(&bp->err_recovery_lock);
 		return -EAGAIN;
@@ -1476,6 +1477,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
 	if (bp->flags & BNXT_FLAG_FW_RESET) {
 			    "Adapter recovering from error...Please retry\n");
+		pthread_mutex_unlock(&bp->err_recovery_lock);
 		return -EAGAIN;

             reply	other threads:[~2021-01-13  4:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  4:30 Somnath Kotur [this message]
2021-01-14  2:27 ` [dpdk-dev] [PATCH v2] net/bnxt: fix lock handling in stop and close Ajit Khaparde
2021-01-21  7:16   ` [dpdk-dev] [PATCH v3] " Ajit Khaparde
2021-01-21 16:02     ` 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:

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

  git send-email \
    --in-reply-to=20210113043011.6291-1-somnath.kotur@broadcom.com \
    --to=somnath.kotur@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git