IB/mlx5: Adjust mlx5 rate mapping to support 800Gb
authorPatrisious Haddad <phaddad@nvidia.com>
Wed, 20 Sep 2023 10:07:44 +0000 (13:07 +0300)
committerLeon Romanovsky <leon@kernel.org>
Tue, 26 Sep 2023 09:38:54 +0000 (12:38 +0300)
Adjust mlx5 function which maps the speed rate from IB spec values
to internal driver values to be able to handle speeds up to 800Gb.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Mark Zhang <markzhang@nvidia.com>
Link: https://lore.kernel.org/r/301c803d8486b0df8aefad3fb3cc10dc58671985.1695204156.git.leon@kernel.org
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/qp.c

index 78b96bfb4e6ac9df9bb24f0f5a29a76ed4520b0a..762e68fd044cc243a842edd11509a8ef0d9c7d1d 100644 (file)
@@ -3436,7 +3436,7 @@ static int ib_rate_to_mlx5(struct mlx5_ib_dev *dev, u8 rate)
        if (rate == IB_RATE_PORT_CURRENT)
                return 0;
 
-       if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_600_GBPS)
+       if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_800_GBPS)
                return -EINVAL;
 
        stat_rate_support = MLX5_CAP_GEN(dev->mdev, stat_rate_support);