netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com
Subject: [PATCH net 4/9] bnxt_en: Add missing check for BNXT_STATE_ABORT_ERR in bnxt_fw_rset_task()
Date: Sun, 18 Jul 2021 15:36:28 -0400	[thread overview]
Message-ID: <1626636993-31926-5-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1626636993-31926-1-git-send-email-michael.chan@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

In the BNXT_FW_RESET_STATE_POLL_VF state in bnxt_fw_reset_task() after all
VFs have unregistered, we need to check for BNXT_STATE_ABORT_ERR after
we acquire the rtnl_lock.  If the flag is set, we need to abort.

Fixes: 230d1f0de754 ("bnxt_en: Handle firmware reset.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index fdfb75a1608d..39908a3d9460 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -11992,6 +11992,10 @@ static void bnxt_fw_reset_task(struct work_struct *work)
 		}
 		bp->fw_reset_timestamp = jiffies;
 		rtnl_lock();
+		if (test_bit(BNXT_STATE_ABORT_ERR, &bp->state)) {
+			rtnl_unlock();
+			goto fw_reset_abort;
+		}
 		bnxt_fw_reset_close(bp);
 		if (bp->fw_cap & BNXT_FW_CAP_ERR_RECOVER_RELOAD) {
 			bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW_DOWN;
-- 
2.18.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]

  parent reply	other threads:[~2021-07-18 19:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-18 19:36 [PATCH net 0/9] bnxt_en: Bug fixes Michael Chan
2021-07-18 19:36 ` [PATCH net 1/9] bnxt_en: don't disable an already disabled PCI device Michael Chan
2021-07-18 19:36 ` [PATCH net 2/9] bnxt_en: reject ETS settings that will starve a TC Michael Chan
2021-07-18 19:36 ` [PATCH net 3/9] bnxt_en: Refresh RoCE capabilities in bnxt_ulp_probe() Michael Chan
2021-07-18 19:36 ` Michael Chan [this message]
2021-07-18 19:36 ` [PATCH net 5/9] bnxt_en: fix error path of FW reset Michael Chan
2021-07-18 19:36 ` [PATCH net 6/9] bnxt_en: Validate vlan protocol ID on RX packets Michael Chan
2021-07-18 19:36 ` [PATCH net 7/9] bnxt_en: Check abort error state in bnxt_half_open_nic() Michael Chan
2021-07-18 19:36 ` [PATCH net 8/9] bnxt_en: Move bnxt_ptp_init() to bnxt_open() Michael Chan
2021-07-19 10:43   ` Jakub Kicinski
2021-07-19 17:07     ` Richard Cochran
2021-07-20  5:29       ` Michael Chan
2021-07-18 19:36 ` [PATCH net 9/9] bnxt_en: Fix PTP capability discovery Michael Chan
2021-07-19 16:00 ` [PATCH net 0/9] bnxt_en: Bug fixes patchwork-bot+netdevbpf

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=1626636993-31926-5-git-send-email-michael.chan@broadcom.com \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=gospo@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.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).