Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351671
b: refs/heads/master
c: db0e7cb
h: refs/heads/master
i:
  351669: 8404018
  351667: a370d79
  351663: c024fc2
v: v3
  • Loading branch information
Aviad Yehezkel authored and David S. Miller committed Jan 28, 2013
1 parent 8d28aa6 commit 4301c64
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d51837fa1ee7ff5c42f34b07dc460daff6afda1
refs/heads/master: db0e7cba6dafa269f33f379997794a9d3bd4d535
35 changes: 26 additions & 9 deletions trunk/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,15 +1167,6 @@ int mlx4_en_start_port(struct net_device *dev)

/* Must redo promiscuous mode setup. */
priv->flags &= ~(MLX4_EN_FLAG_PROMISC | MLX4_EN_FLAG_MC_PROMISC);
if (mdev->dev->caps.steering_mode ==
MLX4_STEERING_MODE_DEVICE_MANAGED) {
mlx4_flow_steer_promisc_remove(mdev->dev,
priv->port,
MLX4_FS_PROMISC_UPLINK);
mlx4_flow_steer_promisc_remove(mdev->dev,
priv->port,
MLX4_FS_PROMISC_ALL_MULTI);
}

/* Schedule multicast task to populate multicast list */
queue_work(mdev->workqueue, &priv->mcast_task);
Expand Down Expand Up @@ -1227,6 +1218,32 @@ void mlx4_en_stop_port(struct net_device *dev)
/* Set port as not active */
priv->port_up = false;

/* Promsicuous mode */
if (mdev->dev->caps.steering_mode ==
MLX4_STEERING_MODE_DEVICE_MANAGED) {
priv->flags &= ~(MLX4_EN_FLAG_PROMISC |
MLX4_EN_FLAG_MC_PROMISC);
mlx4_flow_steer_promisc_remove(mdev->dev,
priv->port,
MLX4_FS_PROMISC_UPLINK);
mlx4_flow_steer_promisc_remove(mdev->dev,
priv->port,
MLX4_FS_PROMISC_ALL_MULTI);
} else if (priv->flags & MLX4_EN_FLAG_PROMISC) {
priv->flags &= ~MLX4_EN_FLAG_PROMISC;

/* Disable promiscouos mode */
mlx4_unicast_promisc_remove(mdev->dev, priv->base_qpn,
priv->port);

/* Disable Multicast promisc */
if (priv->flags & MLX4_EN_FLAG_MC_PROMISC) {
mlx4_multicast_promisc_remove(mdev->dev, priv->base_qpn,
priv->port);
priv->flags &= ~MLX4_EN_FLAG_MC_PROMISC;
}
}

/* Detach All multicasts */
memset(&mc_list[10], 0xff, ETH_ALEN);
mc_list[5] = priv->port; /* needed for B0 steering support */
Expand Down

0 comments on commit 4301c64

Please sign in to comment.