All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net 1/6] bnxt_en: Improve multicast address setup logic.
Date: Thu, 25 Apr 2019 22:31:50 -0400	[thread overview]
Message-ID: <1556245915-5430-2-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1556245915-5430-1-git-send-email-michael.chan@broadcom.com>

The driver builds a list of multicast addresses and sends it to the
firmware when the driver's ndo_set_rx_mode() is called.  In rare
cases, the firmware can fail this call if internal resources to
add multicast addresses are exhausted.  In that case, we should
try the call again by setting the ALL_MCAST flag which is more
guaranteed to succeed.

Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 4c586ba..42fd273 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -8961,8 +8961,15 @@ static int bnxt_cfg_rx_mode(struct bnxt *bp)
 
 skip_uc:
 	rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, 0);
+	if (rc && vnic->mc_list_count) {
+		netdev_info(bp->dev, "Failed setting MC filters rc: %d, turning on ALL_MCAST mode\n",
+			    rc);
+		vnic->rx_mask |= CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST;
+		vnic->mc_list_count = 0;
+		rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, 0);
+	}
 	if (rc)
-		netdev_err(bp->dev, "HWRM cfa l2 rx mask failure rc: %x\n",
+		netdev_err(bp->dev, "HWRM cfa l2 rx mask failure rc: %d\n",
 			   rc);
 
 	return rc;
-- 
2.5.1


  reply	other threads:[~2019-04-26  2:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
2019-04-26  2:31 ` Michael Chan [this message]
2019-04-26  2:31 ` [PATCH net 2/6] bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one() Michael Chan
2019-04-26  2:31 ` [PATCH net 3/6] bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error conditions Michael Chan
2019-04-26  2:31 ` [PATCH net 4/6] bnxt_en: Pass correct extended TX port statistics size to firmware Michael Chan
2019-04-26  2:31 ` [PATCH net 5/6] bnxt_en: Fix statistics context reservation logic Michael Chan
2019-04-26  2:31 ` [PATCH net 6/6] bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt() Michael Chan
2019-04-26 13:06   ` Nathan Chancellor
2019-04-27 21:01 ` [PATCH net 0/6] bnxt_en: Misc. 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=1556245915-5430-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.