mlx4_en: Fix loss of promiscuity
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 27 Mar 2011 01:01:26 +0000 (01:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Mar 2011 06:35:06 +0000 (23:35 -0700)
The mlx4_en driver uses the combination stop_port/start_port
in a number of places.  Unfortunately that causes any promiscuous
mode settings on the hardware to be lost.

This patch fixes that problem.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mlx4/en_netdev.c

index 5762ebde44557dd194212454fb9d20cd828ea822..4f158baa0246be3022c7bb2843a0e4be2a834671 100644 (file)
@@ -742,6 +742,9 @@ int mlx4_en_start_port(struct net_device *dev)
                                  0, MLX4_PROT_ETH))
                mlx4_warn(mdev, "Failed Attaching Broadcast\n");
 
+       /* Must redo promiscuous mode setup. */
+       priv->flags &= ~(MLX4_EN_FLAG_PROMISC | MLX4_EN_FLAG_MC_PROMISC);
+
        /* Schedule multicast task to populate multicast list */
        queue_work(mdev->workqueue, &priv->mcast_task);