aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/mcg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mcg.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mcg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index 0785d9b2a265..ca574d850b39 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -136,7 +136,7 @@ static int new_steering_entry(struct mlx4_dev *dev, u8 port,
136 u32 prot; 136 u32 prot;
137 int err; 137 int err;
138 138
139 s_steer = &mlx4_priv(dev)->steer[0]; 139 s_steer = &mlx4_priv(dev)->steer[port - 1];
140 new_entry = kzalloc(sizeof *new_entry, GFP_KERNEL); 140 new_entry = kzalloc(sizeof *new_entry, GFP_KERNEL);
141 if (!new_entry) 141 if (!new_entry)
142 return -ENOMEM; 142 return -ENOMEM;
@@ -220,7 +220,7 @@ static int existing_steering_entry(struct mlx4_dev *dev, u8 port,
220 struct mlx4_promisc_qp *pqp; 220 struct mlx4_promisc_qp *pqp;
221 struct mlx4_promisc_qp *dqp; 221 struct mlx4_promisc_qp *dqp;
222 222
223 s_steer = &mlx4_priv(dev)->steer[0]; 223 s_steer = &mlx4_priv(dev)->steer[port - 1];
224 224
225 pqp = get_promisc_qp(dev, 0, steer, qpn); 225 pqp = get_promisc_qp(dev, 0, steer, qpn);
226 if (!pqp) 226 if (!pqp)
@@ -265,7 +265,7 @@ static bool check_duplicate_entry(struct mlx4_dev *dev, u8 port,
265 struct mlx4_steer_index *tmp_entry, *entry = NULL; 265 struct mlx4_steer_index *tmp_entry, *entry = NULL;
266 struct mlx4_promisc_qp *dqp, *tmp_dqp; 266 struct mlx4_promisc_qp *dqp, *tmp_dqp;
267 267
268 s_steer = &mlx4_priv(dev)->steer[0]; 268 s_steer = &mlx4_priv(dev)->steer[port - 1];
269 269
270 /* if qp is not promisc, it cannot be duplicated */ 270 /* if qp is not promisc, it cannot be duplicated */
271 if (!get_promisc_qp(dev, 0, steer, qpn)) 271 if (!get_promisc_qp(dev, 0, steer, qpn))
@@ -306,7 +306,7 @@ static bool can_remove_steering_entry(struct mlx4_dev *dev, u8 port,
306 bool ret = false; 306 bool ret = false;
307 int i; 307 int i;
308 308
309 s_steer = &mlx4_priv(dev)->steer[0]; 309 s_steer = &mlx4_priv(dev)->steer[port - 1];
310 310
311 mailbox = mlx4_alloc_cmd_mailbox(dev); 311 mailbox = mlx4_alloc_cmd_mailbox(dev);
312 if (IS_ERR(mailbox)) 312 if (IS_ERR(mailbox))
@@ -361,7 +361,7 @@ static int add_promisc_qp(struct mlx4_dev *dev, u8 port,
361 int err; 361 int err;
362 struct mlx4_priv *priv = mlx4_priv(dev); 362 struct mlx4_priv *priv = mlx4_priv(dev);
363 363
364 s_steer = &mlx4_priv(dev)->steer[0]; 364 s_steer = &mlx4_priv(dev)->steer[port - 1];
365 365
366 mutex_lock(&priv->mcg_table.mutex); 366 mutex_lock(&priv->mcg_table.mutex);
367 367
@@ -466,7 +466,7 @@ static int remove_promisc_qp(struct mlx4_dev *dev, u8 port,
466 int loc, i; 466 int loc, i;
467 int err; 467 int err;
468 468
469 s_steer = &mlx4_priv(dev)->steer[0]; 469 s_steer = &mlx4_priv(dev)->steer[port - 1];
470 mutex_lock(&priv->mcg_table.mutex); 470 mutex_lock(&priv->mcg_table.mutex);
471 471
472 pqp = get_promisc_qp(dev, 0, steer, qpn); 472 pqp = get_promisc_qp(dev, 0, steer, qpn);
@@ -1004,7 +1004,7 @@ EXPORT_SYMBOL_GPL(mlx4_multicast_promisc_remove);
1004 1004
1005int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port) 1005int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port)
1006{ 1006{
1007 if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_MC_STEER)) 1007 if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER))
1008 return 0; 1008 return 0;
1009 1009
1010 if (mlx4_is_mfunc(dev)) 1010 if (mlx4_is_mfunc(dev))
@@ -1016,7 +1016,7 @@ EXPORT_SYMBOL_GPL(mlx4_unicast_promisc_add);
1016 1016
1017int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port) 1017int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port)
1018{ 1018{
1019 if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_MC_STEER)) 1019 if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER))
1020 return 0; 1020 return 0;
1021 1021
1022 if (mlx4_is_mfunc(dev)) 1022 if (mlx4_is_mfunc(dev))