Skip to content

Commit f52cc62

Browse files
committed
Revert "net/mlx5: Enable management PF initialization"
This reverts commit fe998a3. Paul reports that it causes a regression with IB on CX4 and FW 12.18.1000. In addition I think that the concept of "management PF" is not fully accepted and requires a discussion. Fixes: fe998a3 ("net/mlx5: Enable management PF initialization") Reported-by: Paul Moore <[email protected]> Link: https://lore.kernel.org/all/CAHC9VhQ7A4+msL38WpbOMYjAqLp0EtOjeLh4Dc6SQtD6OUvCQg@mail.gmail.com/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9d94769 commit f52cc62

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

drivers/net/ethernet/mellanox/mlx5/core/dev.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ bool mlx5_eth_supported(struct mlx5_core_dev *dev)
5959
if (!IS_ENABLED(CONFIG_MLX5_CORE_EN))
6060
return false;
6161

62-
if (mlx5_core_is_management_pf(dev))
63-
return false;
64-
6562
if (MLX5_CAP_GEN(dev, port_type) != MLX5_CAP_PORT_TYPE_ETH)
6663
return false;
6764

@@ -201,9 +198,6 @@ bool mlx5_rdma_supported(struct mlx5_core_dev *dev)
201198
if (!IS_ENABLED(CONFIG_MLX5_INFINIBAND))
202199
return false;
203200

204-
if (mlx5_core_is_management_pf(dev))
205-
return false;
206-
207201
if (dev->priv.flags & MLX5_PRIV_FLAGS_DISABLE_IB_ADEV)
208202
return false;
209203

drivers/net/ethernet/mellanox/mlx5/core/ecpf.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ int mlx5_ec_init(struct mlx5_core_dev *dev)
7575
if (!mlx5_core_is_ecpf(dev))
7676
return 0;
7777

78-
/* Management PF don't have a peer PF */
79-
if (mlx5_core_is_management_pf(dev))
80-
return 0;
81-
8278
return mlx5_host_pf_init(dev);
8379
}
8480

@@ -89,10 +85,6 @@ void mlx5_ec_cleanup(struct mlx5_core_dev *dev)
8985
if (!mlx5_core_is_ecpf(dev))
9086
return;
9187

92-
/* Management PF don't have a peer PF */
93-
if (mlx5_core_is_management_pf(dev))
94-
return;
95-
9688
mlx5_host_pf_cleanup(dev);
9789

9890
err = mlx5_wait_for_pages(dev, &dev->priv.page_counters[MLX5_HOST_PF]);

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,7 @@ int mlx5_esw_sf_max_hpf_functions(struct mlx5_core_dev *dev, u16 *max_sfs, u16 *
14881488
void *hca_caps;
14891489
int err;
14901490

1491-
if (!mlx5_core_is_ecpf(dev) || mlx5_core_is_management_pf(dev)) {
1491+
if (!mlx5_core_is_ecpf(dev)) {
14921492
*max_sfs = 0;
14931493
return 0;
14941494
}

include/linux/mlx5/driver.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,11 +1211,6 @@ static inline bool mlx5_core_is_vf(const struct mlx5_core_dev *dev)
12111211
return dev->coredev_type == MLX5_COREDEV_VF;
12121212
}
12131213

1214-
static inline bool mlx5_core_is_management_pf(const struct mlx5_core_dev *dev)
1215-
{
1216-
return MLX5_CAP_GEN(dev, num_ports) == 1 && !MLX5_CAP_GEN(dev, native_port_num);
1217-
}
1218-
12191214
static inline bool mlx5_core_is_ecpf(const struct mlx5_core_dev *dev)
12201215
{
12211216
return dev->caps.embedded_cpu;

0 commit comments

Comments
 (0)