From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net 8/8] bnxt_en: Check valid VNIC ID in bnxt_hwrm_vnic_set_tpa().
Date: Fri, 9 Mar 2018 23:46:10 -0500 [thread overview]
Message-ID: <1520657170-398-9-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1520657170-398-1-git-send-email-michael.chan@broadcom.com>
During initialization, if we encounter errors, there is a code path that
calls bnxt_hwrm_vnic_set_tpa() with invalid VNIC ID. This may cause a
warning in firmware logs.
Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index cc9569f..c7e5e6f 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -3847,6 +3847,9 @@ static int bnxt_hwrm_vnic_set_tpa(struct bnxt *bp, u16 vnic_id, u32 tpa_flags)
struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];
struct hwrm_vnic_tpa_cfg_input req = {0};
+ if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
+ return 0;
+
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_VNIC_TPA_CFG, -1, -1);
if (tpa_flags) {
--
1.8.3.1
next prev parent reply other threads:[~2018-03-10 4:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-10 4:46 [PATCH net 0/8] bnxt_en: Bug fixes Michael Chan
2018-03-10 4:46 ` [PATCH net 1/8] bnxt_en: Refactor the functions to reserve hardware rings Michael Chan
2018-03-10 4:46 ` [PATCH net 2/8] bnxt_en: Fix vnic accounting in the bnxt_check_rings() path Michael Chan
2018-03-10 4:46 ` [PATCH net 3/8] bnxt_en: Remove unwanted ovs-offload messages in some conditions Michael Chan
2018-03-10 4:46 ` [PATCH net 4/8] bnxt_en: Pass complete VLAN TCI to the stack Michael Chan
2018-03-10 4:46 ` [PATCH net 5/8] bnxt_en: Fix regressions when setting up MQPRIO TX rings Michael Chan
2018-03-10 4:46 ` [PATCH net 6/8] bnxt_en: Return standard Linux error codes for hwrm flow cmds Michael Chan
2018-03-10 4:46 ` [PATCH net 7/8] bnxt_en: close & open NIC, only when the interface is in running state Michael Chan
2018-03-10 4:46 ` Michael Chan [this message]
2018-03-12 14:58 ` [PATCH net 0/8] bnxt_en: Bug fixes David Miller
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=1520657170-398-9-git-send-email-michael.chan@broadcom.com \
--to=michael.chan@broadcom.com \
--cc=davem@davemloft.net \
--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).