From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, gospo@broadcom.com,
Somnath Kotur <somnath.kotur@broadcom.com>,
Kalesh AP <kalesh-anakkur.purayil@broadcom.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Andy Gospodarek <andrew.gospodarek@broadcom.com>
Subject: [PATCH net v3 1/4] bnxt_en: Clear resource reservation during resume
Date: Thu, 7 Dec 2023 16:16:55 -0800 [thread overview]
Message-ID: <20231208001658.14230-2-michael.chan@broadcom.com> (raw)
In-Reply-To: <20231208001658.14230-1-michael.chan@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]
From: Somnath Kotur <somnath.kotur@broadcom.com>
We are issuing HWRM_FUNC_RESET cmd to reset the device including
all reserved resources, but not clearing the reservations
within the driver struct. As a result, when the driver re-initializes
as part of resume, it believes that there is no need to do any
resource reservation and goes ahead and tries to allocate rings
which will eventually fail beyond a certain number pre-reserved by
the firmware.
Fixes: 674f50a5b026 ("bnxt_en: Implement new method to reserve rings.")
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
v3: Fix Fixes tag.
v2: Fix typo in SoB tag.
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index d0359b569afe..72f2fc983940 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -13940,6 +13940,8 @@ static int bnxt_resume(struct device *device)
if (rc)
goto resume_exit;
+ bnxt_clear_reservations(bp, true);
+
if (bnxt_hwrm_func_drv_rgtr(bp, NULL, 0, false)) {
rc = -ENODEV;
goto resume_exit;
--
2.30.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
next prev parent reply other threads:[~2023-12-08 0:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 0:16 [PATCH net v3 0/4] bnxt_en: Misc. fixes Michael Chan
2023-12-08 0:16 ` Michael Chan [this message]
2023-12-08 0:16 ` [PATCH net v3 2/4] bnxt_en: Fix skb recycling logic in bnxt_deliver_skb() Michael Chan
2023-12-08 0:16 ` [PATCH net v3 3/4] bnxt_en: Fix wrong return value check in bnxt_close_nic() Michael Chan
2023-12-08 0:16 ` [PATCH net v3 4/4] bnxt_en: Fix HWTSTAMP_FILTER_ALL packet timestamp logic Michael Chan
2023-12-09 1:40 ` [PATCH net v3 0/4] bnxt_en: Misc. 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=20231208001658.14230-2-michael.chan@broadcom.com \
--to=michael.chan@broadcom.com \
--cc=ajit.khaparde@broadcom.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gospo@broadcom.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--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).