Commit b9d73704 authored by Giuseppe CAVALLARO's avatar Giuseppe CAVALLARO Committed by David S. Miller

stmmac: fix lock in stmmac_set_rx_mode

When compile with CONFIG_PROVE_LOCKING the following warnings happen:

[snip]

    HARDIRQ-ON-W at:
                        [<c0480c1c>] _raw_spin_lock+0x3c/0x4c
                        [<c02c2828>] stmmac_set_rx_mode+0x18/0x3c
                        [<c038b2cc>] dev_set_rx_mode+0x1c/0x28
                        [<c038b38c>] __dev_open+0xb4/0xf8
                        [<c038b5a8>] __dev_change_flags+0x94/0x128
                        [<c038b6a8>] dev_change_flags+0x10/0x48
                        [<c062afe0>] ip_auto_config+0x1d4/0x1084
                        [<c000873c>] do_one_initcall+0x108/0x15c
                        [<c060ec50>] kernel_init_freeable+0x1a8/0x248
                        [<c0472cc0>] kernel_init+0x8/0x160
                        [<c000dfc8>] ret_from_fork+0x14/0x2c
     INITIAL USE at:
                       [<c0480c1c>] _raw_spin_lock+0x3c/0x4c
                       [<c02c2828>] stmmac_set_rx_mode+0x18/0x3c
                       [<c038b2cc>] dev_set_rx_mode+0x1c/0x28
                       [<c038b38c>] __dev_open+0xb4/0xf8
                       [<c038b5a8>] __dev_change_flags+0x94/0x128
                       [<c038b6a8>] dev_change_flags+0x10/0x48
                       [<c062afe0>] ip_auto_config+0x1d4/0x1084
                       [<c000873c>] do_one_initcall+0x108/0x15c
                       [<c060ec50>] kernel_init_freeable+0x1a8/0x248
                       [<c0472cc0>] kernel_init+0x8/0x160
                       [<c000dfc8>] ret_from_fork+0x14/0x2c

so the patch just removes the lock protection in the stmmac_set_rx_mode
Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Emilio Lopez <emilio@elopez.com.ar>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 758a0ab5
......@@ -2283,9 +2283,7 @@ static void stmmac_set_rx_mode(struct net_device *dev)
{
struct stmmac_priv *priv = netdev_priv(dev);
spin_lock(&priv->lock);
priv->hw->mac->set_filter(priv->hw, dev);
spin_unlock(&priv->lock);
}
/**
......
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