diff options
author | Ido Schimmel <idosch@nvidia.com> | 2023-11-15 13:17:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-11-18 18:38:51 +0100 |
commit | 5e12d0898583026581e4f0506ff7c0b15a73a1c5 (patch) | |
tree | 4f079e23d101ef232b2a76743837cce7818e5aa1 /tools | |
parent | mlxsw: pci: Add support for new reset flow (diff) | |
download | linux-5e12d0898583026581e4f0506ff7c0b15a73a1c5.tar.xz linux-5e12d0898583026581e4f0506ff7c0b15a73a1c5.zip |
mlxsw: pci: Implement PCI reset handlers
Implement reset_prepare() and reset_done() handlers that are invoked by
the PCI core before and after issuing a PCI reset, respectively.
Specifically, implement reset_prepare() by calling
mlxsw_core_bus_device_unregister() and reset_done() by calling
mlxsw_core_bus_device_register(). This is the same implementation as the
reload_{down,up}() devlink operations with the following differences:
1. The devlink instance is unregistered and then registered again after
the reset.
2. A reset via the device's command interface (using MRSR register) is
not issued during reset_done() as PCI core already issued a PCI
reset.
Tested:
# for i in $(seq 1 10); do echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset; done
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions