All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Berger <opendmb@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Doug Berger <opendmb@gmail.com>
Subject: [PATCH net-next v2 1/7] net: bcmgenet: set Rx mode before starting netif
Date: Wed, 29 Apr 2020 13:02:00 -0700	[thread overview]
Message-ID: <1588190526-2082-2-git-send-email-opendmb@gmail.com> (raw)
In-Reply-To: <1588190526-2082-1-git-send-email-opendmb@gmail.com>

This commit explicitly calls the bcmgenet_set_rx_mode() function when
the network interface is started. This function is normally called by
ndo_set_rx_mode when the flags are changed, but apparently not when
the driver is suspended and resumed.

This change ensures that address filtering or promiscuous mode are
properly restored by the driver after the MAC may have been reset.

Fixes: b6e978e50444 ("net: bcmgenet: add suspend/resume callbacks")
Signed-off-by: Doug Berger <opendmb@gmail.com>
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 351d0282f199..eb0dd4d4800c 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -65,6 +65,9 @@
 #define GENET_RDMA_REG_OFF	(priv->hw_params->rdma_offset + \
 				TOTAL_DESC * DMA_DESC_SIZE)
 
+/* Forward declarations */
+static void bcmgenet_set_rx_mode(struct net_device *dev);
+
 static inline void bcmgenet_writel(u32 value, void __iomem *offset)
 {
 	/* MIPS chips strapped for BE will automagically configure the
@@ -2793,6 +2796,7 @@ static void bcmgenet_netif_start(struct net_device *dev)
 	struct bcmgenet_priv *priv = netdev_priv(dev);
 
 	/* Start the network engine */
+	bcmgenet_set_rx_mode(dev);
 	bcmgenet_enable_rx_napi(priv);
 
 	umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, true);
-- 
2.7.4


  reply	other threads:[~2020-04-29 20:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 20:01 [PATCH net-next v2 0/7] net: bcmgenet: add support for Wake on Filter Doug Berger
2020-04-29 20:02 ` Doug Berger [this message]
2020-04-29 21:21   ` [PATCH net-next v2 1/7] net: bcmgenet: set Rx mode before starting netif Florian Fainelli
2020-04-29 20:02 ` [PATCH net-next v2 2/7] net: bcmgenet: Fix WoL with password after deep sleep Doug Berger
2020-04-29 21:22   ` Florian Fainelli
2020-04-29 20:02 ` [PATCH net-next v2 3/7] net: bcmgenet: move clk_wol management to bcmgenet_wol Doug Berger
2020-04-29 21:34   ` Florian Fainelli
2020-04-29 20:02 ` [PATCH net-next v2 4/7] Revert "net: bcmgenet: remove unused function in bcmgenet.c" Doug Berger
2020-04-29 21:34   ` Florian Fainelli
2020-04-29 20:02 ` [PATCH net-next v2 5/7] net: bcmgenet: code movement Doug Berger
2020-04-29 21:34   ` Florian Fainelli
2020-04-29 20:02 ` [PATCH net-next v2 6/7] net: bcmgenet: add support for ethtool rxnfc flows Doug Berger
2020-04-29 21:47   ` Florian Fainelli
2020-04-29 20:02 ` [PATCH net-next v2 7/7] net: bcmgenet: add WAKE_FILTER support Doug Berger
2020-04-29 21:48   ` Florian Fainelli
2020-04-29 22:07 ` [PATCH net-next v2 0/7] net: bcmgenet: add support for Wake on Filter Doug Berger
2020-04-29 23:00   ` Doug Berger

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=1588190526-2082-2-git-send-email-opendmb@gmail.com \
    --to=opendmb@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.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 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.