net/mlx5: Check capability for fw_reset
authorMoshe Shemesh <moshe@nvidia.com>
Sun, 28 Jan 2024 18:43:58 +0000 (20:43 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 2 Mar 2024 07:02:26 +0000 (23:02 -0800)
commit5e6107b499f3fc4748109e1d87fd9603b34f1e0d
treec26f698a5dd99b1fcd11016f220300e32b1afbc4
parentac8082a3c7a158640a2c493ec437dd9da881a6a7
net/mlx5: Check capability for fw_reset

Functions which can't access MFRL (Management Firmware Reset Level)
register, have no use of fw_reset structures or events. Remove fw_reset
structures allocation and registration for fw reset events notifications
for these functions.

Having the devlink param enable_remote_dev_reset on functions that don't
have this capability is misleading as these functions are not allowed to
influence the reset flow. Hence, this patch removes this parameter for
such functions.

In addition, return not supported on devlink reload action fw_activate
for these functions.

Fixes: 38b9f903f22b ("net/mlx5: Handle sync reset request event")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c
include/linux/mlx5/mlx5_ifc.h