net/mlx5: Handle sync reset now event
authorMoshe Shemesh <moshe@mellanox.com>
Wed, 7 Oct 2020 06:00:50 +0000 (09:00 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Oct 2020 19:06:52 +0000 (12:06 -0700)
commiteabe8e5e88f509ebaef6cc85dd5d580896d9e066
tree087e0a465b4dc6b88ef8828ec3cb150ec49a377f
parent38b9f903f22b9baa5c4b9bfb07c8bbc49f5efbba
net/mlx5: Handle sync reset now event

On sync_reset_now event the driver does reload and PCI link toggle to
activate firmware upgrade reset. When the firmware sends this event it
syncs the event on all PFs, so all PFs will do PCI link toggle at once.
To do PCI link toggle, the driver ensures that no other device ID under
the same bridge by checking that all the PF functions under the same PCI
bridge have same device ID. If no other device it uses PCI bridge link
control to turn link down and up.

Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c