Commit 72f96347 authored by Doug Berger's avatar Doug Berger Committed by David S. Miller

net: bcmgenet: set Rx mode before starting netif

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: b6e978e5 ("net: bcmgenet: add suspend/resume callbacks")
Signed-off-by: default avatarDoug Berger <opendmb@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 323e395f
...@@ -65,6 +65,9 @@ ...@@ -65,6 +65,9 @@
#define GENET_RDMA_REG_OFF (priv->hw_params->rdma_offset + \ #define GENET_RDMA_REG_OFF (priv->hw_params->rdma_offset + \
TOTAL_DESC * DMA_DESC_SIZE) 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) static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{ {
/* MIPS chips strapped for BE will automagically configure the /* MIPS chips strapped for BE will automagically configure the
...@@ -2793,6 +2796,7 @@ static void bcmgenet_netif_start(struct net_device *dev) ...@@ -2793,6 +2796,7 @@ static void bcmgenet_netif_start(struct net_device *dev)
struct bcmgenet_priv *priv = netdev_priv(dev); struct bcmgenet_priv *priv = netdev_priv(dev);
/* Start the network engine */ /* Start the network engine */
bcmgenet_set_rx_mode(dev);
bcmgenet_enable_rx_napi(priv); bcmgenet_enable_rx_napi(priv);
umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, true); umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment