return err;
}
- err = mlx5_query_port_oper_mtu(mdev, &actual_mtu);
+ err = mlx5_query_port_oper_mtu(mdev, &actual_mtu, 1);
if (err) {
netdev_err(netdev, "%s: mlx5_query_port_oper_mtu failed %d\n",
__func__, err);
int max_mtu;
int err = 0;
- err = mlx5_query_port_max_mtu(mdev, &max_mtu);
+ err = mlx5_query_port_max_mtu(mdev, &max_mtu, 1);
if (err)
return err;
}
static int mlx5_query_port_mtu(struct mlx5_core_dev *dev,
- int *admin_mtu, int *max_mtu, int *oper_mtu)
+ int *admin_mtu, int *max_mtu, int *oper_mtu,
+ u8 local_port)
{
u32 in[MLX5_ST_SZ_DW(pmtu_reg)];
u32 out[MLX5_ST_SZ_DW(pmtu_reg)];
memset(in, 0, sizeof(in));
- MLX5_SET(pmtu_reg, in, local_port, 1);
+ MLX5_SET(pmtu_reg, in, local_port, local_port);
err = mlx5_core_access_reg(dev, in, sizeof(in), out,
sizeof(out), MLX5_REG_PMTU, 0, 0);
}
EXPORT_SYMBOL_GPL(mlx5_set_port_mtu);
-int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu)
+int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu,
+ u8 local_port)
{
- return mlx5_query_port_mtu(dev, NULL, max_mtu, NULL);
+ return mlx5_query_port_mtu(dev, NULL, max_mtu, NULL, local_port);
}
EXPORT_SYMBOL_GPL(mlx5_query_port_max_mtu);
-int mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu)
+int mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu,
+ u8 local_port)
{
- return mlx5_query_port_mtu(dev, NULL, NULL, oper_mtu);
+ return mlx5_query_port_mtu(dev, NULL, NULL, oper_mtu, local_port);
}
EXPORT_SYMBOL_GPL(mlx5_query_port_oper_mtu);
int mlx5_query_port_status(struct mlx5_core_dev *dev, u8 *status);
int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu);
-int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu);
-int mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu);
+int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu,
+ u8 local_port);
+int mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu,
+ u8 local_port);
int mlx5_debug_eq_add(struct mlx5_core_dev *dev, struct mlx5_eq *eq);
void mlx5_debug_eq_remove(struct mlx5_core_dev *dev, struct mlx5_eq *eq);