mlxsw: pci: Move software reset code to a separate function
authorAmit Cohen <amcohen@nvidia.com>
Wed, 15 Nov 2023 12:17:20 +0000 (13:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Nov 2023 17:38:51 +0000 (17:38 +0000)
commit8d9da4672f94b4914d3b9318d911bfd1fcbfc9a1
tree93be50a5dc83fbf210692a32f2410be16eeaed04
parentbdf85f3a695ff8b9709658e576299fa5a3f6326d
mlxsw: pci: Move software reset code to a separate function

In general, the existing flow of software reset in the driver is:
1. Wait for system ready status.
2. Send MRSR command, to start the reset.
3. Wait for system ready status.

This flow will be extended once a new reset command is supported. As a
preparation, move step #2 to a separate function.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
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>
drivers/net/ethernet/mellanox/mlxsw/pci.c