mlx4: do not call napi_schedule() without care
authorEric Dumazet <[email protected]>
Fri, 13 Jan 2017 16:39:24 +0000 (08:39 -0800)
committerDavid S. Miller <[email protected]>
Mon, 16 Jan 2017 16:44:10 +0000 (11:44 -0500)
Disable BH around the call to napi_schedule() to avoid following warning

[   52.095499] NOHZ: local_softirq_pending 08
[   52.421291] NOHZ: local_softirq_pending 08
[   52.608313] NOHZ: local_softirq_pending 08

Fixes: 8d59de8f7bb3 ("net/mlx4_en: Process all completions in RX rings after port goes up")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Erez Shitrit <[email protected]>
Cc: Eugenia Emantayev <[email protected]>
Cc: Tariq Toukan <[email protected]>
Acked-by: Tariq Toukan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index 4910d9af19335d4b97d39760c163b41eecc26242..761f8b12399cab245abccc0f7d7f84fde742c14d 100644 (file)
@@ -1748,8 +1748,11 @@ int mlx4_en_start_port(struct net_device *dev)
        /* Process all completions if exist to prevent
         * the queues freezing if they are full
         */
-       for (i = 0; i < priv->rx_ring_num; i++)
+       for (i = 0; i < priv->rx_ring_num; i++) {
+               local_bh_disable();
                napi_schedule(&priv->rx_cq[i]->napi);
+               local_bh_enable();
+       }
 
        netif_tx_start_all_queues(dev);
        netif_device_attach(dev);