]> git.itanic.dy.fi Git - linux-stable/commit
net/mlx5: Split function_setup() to enable and open functions
authorShay Drory <shayd@nvidia.com>
Wed, 3 May 2023 09:08:48 +0000 (12:08 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 10 Jun 2023 01:40:52 +0000 (18:40 -0700)
commit2059cf51f318681a4cdd3eb1a01a2d62b6a9c442
tree9a710624cb5bea660a9d336449c96534e74a016d
parent7057fe561988effa0b044b99262bb3712a5892c0
net/mlx5: Split function_setup() to enable and open functions

mlx5_cmd_init_hca() is taking ~0.2 seconds. In case of a user who
desire to disable some of the SF aux devices, and with large scale-1K
SFs for example, this user will waste more than 3 minutes on
mlx5_cmd_init_hca() which isn't needed at this stage.

Downstream patch will change SFs which are probe over the E-switch,
local SFs, to be probed without any aux dev. In order to support this,
split function_setup() to avoid executing mlx5_cmd_init_hca().

Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/main.c