From b9d73704aab92602fcadff26f61462a6445bd0cf Mon Sep 17 00:00:00 2001 From: Giuseppe CAVALLARO Date: Tue, 4 Nov 2014 17:08:07 +0100 Subject: [PATCH] stmmac: fix lock in stmmac_set_rx_mode When compile with CONFIG_PROVE_LOCKING the following warnings happen: [snip] HARDIRQ-ON-W at: [] _raw_spin_lock+0x3c/0x4c [] stmmac_set_rx_mode+0x18/0x3c [] dev_set_rx_mode+0x1c/0x28 [] __dev_open+0xb4/0xf8 [] __dev_change_flags+0x94/0x128 [] dev_change_flags+0x10/0x48 [] ip_auto_config+0x1d4/0x1084 [] do_one_initcall+0x108/0x15c [] kernel_init_freeable+0x1a8/0x248 [] kernel_init+0x8/0x160 [] ret_from_fork+0x14/0x2c INITIAL USE at: [] _raw_spin_lock+0x3c/0x4c [] stmmac_set_rx_mode+0x18/0x3c [] dev_set_rx_mode+0x1c/0x28 [] __dev_open+0xb4/0xf8 [] __dev_change_flags+0x94/0x128 [] dev_change_flags+0x10/0x48 [] ip_auto_config+0x1d4/0x1084 [] do_one_initcall+0x108/0x15c [] kernel_init_freeable+0x1a8/0x248 [] kernel_init+0x8/0x160 [] ret_from_fork+0x14/0x2c so the patch just removes the lock protection in the stmmac_set_rx_mode Signed-off-by: Giuseppe Cavallaro Cc: Emilio Lopez Signed-off-by: David S. Miller --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index ee07e7eee647..27598738c9cd 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -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); } /** -- 2.11.0