mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 05:41:55 +00:00
net/mlx5: Support devices with more than 2 ports
Increase the define MLX5_MAX_PORTS to 4 as the driver is ready to support NICs with 4 ports. Signed-off-by: Mark Bloch <mbloch@nvidia.com> Reviewed-by: Maor Gottlieb <maorg@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
7e978e7714
commit
4cd14d44b1
@ -586,7 +586,8 @@ static int next_phys_dev_lag(struct device *dev, const void *data)
|
||||
|
||||
if (!MLX5_CAP_GEN(mdev, vport_group_manager) ||
|
||||
!MLX5_CAP_GEN(mdev, lag_master) ||
|
||||
MLX5_CAP_GEN(mdev, num_lag_ports) != MLX5_MAX_PORTS)
|
||||
(MLX5_CAP_GEN(mdev, num_lag_ports) > MLX5_MAX_PORTS ||
|
||||
MLX5_CAP_GEN(mdev, num_lag_ports) <= 1))
|
||||
return 0;
|
||||
|
||||
return _next_phys_dev(mdev, data);
|
||||
|
@ -1050,7 +1050,8 @@ void mlx5_lag_add_mdev(struct mlx5_core_dev *dev)
|
||||
|
||||
if (!MLX5_CAP_GEN(dev, vport_group_manager) ||
|
||||
!MLX5_CAP_GEN(dev, lag_master) ||
|
||||
MLX5_CAP_GEN(dev, num_lag_ports) != MLX5_MAX_PORTS)
|
||||
(MLX5_CAP_GEN(dev, num_lag_ports) > MLX5_MAX_PORTS ||
|
||||
MLX5_CAP_GEN(dev, num_lag_ports) <= 1))
|
||||
return;
|
||||
|
||||
recheck:
|
||||
|
@ -84,7 +84,7 @@ enum mlx5_sqp_t {
|
||||
};
|
||||
|
||||
enum {
|
||||
MLX5_MAX_PORTS = 2,
|
||||
MLX5_MAX_PORTS = 4,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user