net/mlx5: fw reset, check bridge accessibility at earlier stage
authorAmir Tzin <amirtz@nvidia.com>
Wed, 19 Mar 2025 14:03:00 +0000 (16:03 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Mar 2025 14:29:47 +0000 (07:29 -0700)
commitade4794fe8934e9c277ef50acb11db9e68cbea7c
tree0391eb9c4135223aef3b77ec1b4c4cd1344fee02
parent16ad8394bf310791d2ad171e266b639b6b265fc5
net/mlx5: fw reset, check bridge accessibility at earlier stage

Currently, mlx5_is_reset_now_capable() checks whether the pci bridge is
accessible only on bridge hot plug capability check.  If the pci bridge
is not accessible, reset now will fail regardless of bridge hotplug
capability. Move this check to function mlx5_is_reset_now_capable()
which, in such case, aborts the reset and does so in the request phase
instead of the reset now phase.

Signed-off-by: Aya Levin <ayal@nvidia.com>
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Amir Tzin <amirtz@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1742392983-153050-3-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c