diff options
author | Roi Dayan <roid@nvidia.com> | 2023-05-02 12:44:47 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-05-19 20:50:31 +0300 |
commit | 0279b5454c0e8344f30fcac90db76cf17b6b76c7 (patch) | |
tree | 208f513d9902d607a307590c2315349e227dfa85 /drivers/net/ethernet/mellanox/mlx5/core/devlink.c | |
parent | 7eb197fd83a355214346feddd55fe3336125953f (diff) | |
download | linux-0279b5454c0e8344f30fcac90db76cf17b6b76c7.tar.xz |
net/mlx5: devlink, Only show PF related devlink warning when needed
Limit the PF related warning to show if device is actually a PF.
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/devlink.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c index 0e07971e024a..bfaec67abf0d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c @@ -162,9 +162,8 @@ static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change, return -EOPNOTSUPP; } - if (pci_num_vf(pdev)) { + if (mlx5_core_is_pf(dev) && pci_num_vf(pdev)) NL_SET_ERR_MSG_MOD(extack, "reload while VFs are present is unfavorable"); - } switch (action) { case DEVLINK_RELOAD_ACTION_DRIVER_REINIT: |