]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/mlx5: Reload auxiliary drivers on fw_activate
authorMoshe Shemesh <moshe@nvidia.com>
Mon, 25 Aug 2025 14:34:28 +0000 (17:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 13:31:49 +0000 (15:31 +0200)
[ Upstream commit 34cc6a54914f478c93e176450fae6313404f9f74 ]

The devlink reload fw_activate command performs firmware activation
followed by driver reload, while devlink reload driver_reinit triggers
only driver reload. However, the driver reload logic differs between the
two modes, as on driver_reinit mode mlx5 also reloads auxiliary drivers,
while in fw_activate mode the auxiliary drivers are suspended where
applicable.

Additionally, following the cited commit, if the device has multiple PFs,
the behavior during fw_activate may vary between PFs: one PF may suspend
auxiliary drivers, while another reloads them.

Align devlink dev reload fw_activate behavior with devlink dev reload
driver_reinit, to reload all auxiliary drivers.

Fixes: 72ed5d5624af ("net/mlx5: Suspend auxiliary devices only in case of PCI device suspend")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Akiva Goldberger <agoldberger@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/20250825143435.598584-6-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c

index a2cf3e79693dd8060c5c5d1b42ef1e4349d8058b..7211e65ad2dcc74bfaaf8a6a85571ad810dea665 100644 (file)
@@ -107,7 +107,7 @@ static int mlx5_devlink_reload_fw_activate(struct devlink *devlink, struct netli
        if (err)
                return err;
 
-       mlx5_unload_one_devl_locked(dev, true);
+       mlx5_unload_one_devl_locked(dev, false);
        err = mlx5_health_wait_pci_up(dev);
        if (err)
                NL_SET_ERR_MSG_MOD(extack, "FW activate aborted, PCI reads fail after reset");