]> Git Repo - linux.git/commitdiff
net/mlx5: Set num_vhca_ports capability
authorDaniel Jurgens <[email protected]>
Thu, 4 Jan 2018 15:25:44 +0000 (17:25 +0200)
committerJason Gunthorpe <[email protected]>
Mon, 8 Jan 2018 18:42:48 +0000 (11:42 -0700)
Set the current capability to the max capability. Doing so enables dual
port RoCE functionality if supported by the firmware.

Signed-off-by: Daniel Jurgens <[email protected]>
Reviewed-by: Parav Pandit <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
drivers/net/ethernet/mellanox/mlx5/core/main.c

index e382a3ca759ee95fc55b5bb265b980685574d9c3..d4a471a76d823d74e4ce3c774de5275e4ce9c3da 100644 (file)
@@ -557,6 +557,12 @@ static int handle_hca_cap(struct mlx5_core_dev *dev)
        if (MLX5_CAP_GEN_MAX(dev, dct))
                MLX5_SET(cmd_hca_cap, set_hca_cap, dct, 1);
 
+       if (MLX5_CAP_GEN_MAX(dev, num_vhca_ports))
+               MLX5_SET(cmd_hca_cap,
+                        set_hca_cap,
+                        num_vhca_ports,
+                        MLX5_CAP_GEN_MAX(dev, num_vhca_ports));
+
        err = set_caps(dev, set_ctx, set_sz,
                       MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE);
 
This page took 0.064504 seconds and 4 git commands to generate.