From: Ajit Khaparde <ajitkhaparde@gmail.com>
To: dev@dpdk.org
Cc: Somnath Kotur <somnath.kotur@broadcom.com>
Subject: [dpdk-dev] [PATCH v3] net/bnxt: fix lock handling in stop and close
Date: Wed, 20 Jan 2021 23:16:56 -0800 [thread overview]
Message-ID: <20210121071656.32879-1-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20210114022716.7999-1-ajit.khaparde@broadcom.com>
From: Somnath Kotur <somnath.kotur@broadcom.com>
err_recovery_lock needs to be released before returning in
stop and close_op if FW_RESET flag is set.
Fixes: dd3613560573 ("net/bnxt: check chip reset in dev stop and close")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
v1->v2: rebased to latest dpdk-next-net and updated commit log.
v2->v3: rebased to latest dpdk-next-net.
---
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 f439aeee4..89e42ef14 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) {
PMD_DRV_LOG(ERR,
"Adapter recovering from error..Please retry\n");
+ pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
pthread_mutex_unlock(&bp->err_recovery_lock);
@@ -1497,6 +1498,7 @@ static int bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
if (bp->flags & BNXT_FLAG_FW_RESET) {
PMD_DRV_LOG(ERR,
"Adapter recovering from error...Please retry\n");
+ pthread_mutex_unlock(&bp->err_recovery_lock);
return -EAGAIN;
}
pthread_mutex_unlock(&bp->err_recovery_lock);
--
2.21.1 (Apple Git-122.3)
next prev parent reply other threads:[~2021-01-21 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 4:30 [dpdk-dev] [PATCH] net/bnxt: fix to release lock in error path of stop and close op Somnath Kotur
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 ` Ajit Khaparde [this message]
2021-01-21 16:02 ` [dpdk-dev] [PATCH v3] " 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=20210121071656.32879-1-ajit.khaparde@broadcom.com \
--to=ajitkhaparde@gmail.com \
--cc=dev@dpdk.org \
--cc=somnath.kotur@broadcom.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).