aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/port.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/port.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c
index a8fb52992c6..58de7237f57 100644
--- a/drivers/net/ethernet/mellanox/mlx4/port.c
+++ b/drivers/net/ethernet/mellanox/mlx4/port.c
@@ -155,7 +155,7 @@ int mlx4_get_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn)
155 return err; 155 return err;
156 } 156 }
157 157
158 if (!(dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER)) { 158 if (dev->caps.steering_mode == MLX4_STEERING_MODE_A0) {
159 *qpn = info->base_qpn + index; 159 *qpn = info->base_qpn + index;
160 return 0; 160 return 0;
161 } 161 }
@@ -206,7 +206,7 @@ void mlx4_put_eth_qp(struct mlx4_dev *dev, u8 port, u64 mac, int qpn)
206 (unsigned long long) mac); 206 (unsigned long long) mac);
207 mlx4_unregister_mac(dev, port, mac); 207 mlx4_unregister_mac(dev, port, mac);
208 208
209 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER) { 209 if (dev->caps.steering_mode != MLX4_STEERING_MODE_A0) {
210 entry = radix_tree_lookup(&info->mac_tree, qpn); 210 entry = radix_tree_lookup(&info->mac_tree, qpn);
211 if (entry) { 211 if (entry) {
212 mlx4_dbg(dev, "Releasing qp: port %d, mac 0x%llx," 212 mlx4_dbg(dev, "Releasing qp: port %d, mac 0x%llx,"
@@ -359,7 +359,7 @@ int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac)
359 int index = qpn - info->base_qpn; 359 int index = qpn - info->base_qpn;
360 int err = 0; 360 int err = 0;
361 361
362 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER) { 362 if (dev->caps.steering_mode != MLX4_STEERING_MODE_A0) {
363 entry = radix_tree_lookup(&info->mac_tree, qpn); 363 entry = radix_tree_lookup(&info->mac_tree, qpn);
364 if (!entry) 364 if (!entry)
365 return -EINVAL; 365 return -EINVAL;
@@ -803,8 +803,7 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn,
803 u32 m_promisc = (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_MC_STEER) ? 803 u32 m_promisc = (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_MC_STEER) ?
804 MCAST_DIRECT : MCAST_DEFAULT; 804 MCAST_DIRECT : MCAST_DEFAULT;
805 805
806 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_MC_STEER && 806 if (dev->caps.steering_mode != MLX4_STEERING_MODE_A0)
807 dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_UC_STEER)
808 return 0; 807 return 0;
809 808
810 mailbox = mlx4_alloc_cmd_mailbox(dev); 809 mailbox = mlx4_alloc_cmd_mailbox(dev);