mbox series

[net-next,00/14] mlxsw: Add support for new reset flow

Message ID cover.1700047319.git.petrm@nvidia.com (mailing list archive)
Headers show
Series mlxsw: Add support for new reset flow | expand

Message

Petr Machata Nov. 15, 2023, 12:17 p.m. UTC
Ido Schimmel writes:

This patchset changes mlxsw to issue a PCI reset during probe and
devlink reload so that the PCI firmware could be upgraded without a
reboot.

Unlike the old version of this patchset [1], in this version the driver
no longer tries to issue a PCI reset by triggering a PCI link toggle on
its own, but instead calls the PCI core to issue the reset.

The PCI APIs require the device lock to be held which is why patches
#1-#6 adjust devlink to acquire the device lock during reload.

Patches #7 adds reset method quirk for NVIDIA Spectrum devices.

Patch #8 adds a debug level print in PCI core so that device ready delay
will be printed even if it is shorter than one second.

Patches #9-#11 are straightforward preparations in mlxsw.

Patch #12 finally implements the new reset flow in mlxsw.

Patch #13 adds PCI reset handlers in mlxsw to avoid user space from
resetting the device from underneath an unaware driver. Instead, the
driver is gracefully de-initialized before the PCI reset and then
initialized again after it.

Patch #14 adds a PCI reset selftest to make sure this code path does not
regress.

[1] https://lore.kernel.org/netdev/cover.1679502371.git.petrm@nvidia.com/

Amit Cohen (3):
  mlxsw: Extend MRSR pack() function to support new commands
  mlxsw: pci: Rename mlxsw_pci_sw_reset()
  mlxsw: pci: Move software reset code to a separate function

Ido Schimmel (11):
  devlink: Move private netlink flags to C file
  devlink: Acquire device lock during netns dismantle
  devlink: Enable the use of private flags in post_doit operations
  devlink: Allow taking device lock in pre_doit operations
  devlink: Acquire device lock during reload command
  devlink: Add device lock assert in reload operation
  PCI: Add no PM reset quirk for NVIDIA Spectrum devices
  PCI: Add debug print for device ready delay
  mlxsw: pci: Add support for new reset flow
  mlxsw: pci: Implement PCI reset handlers
  selftests: mlxsw: Add PCI reset test

 Documentation/netlink/specs/devlink.yaml      |  4 +-
 drivers/net/ethernet/mellanox/mlxsw/pci.c     | 90 +++++++++++++++++--
 drivers/net/ethernet/mellanox/mlxsw/reg.h     | 16 +++-
 drivers/pci/pci.c                             |  3 +
 drivers/pci/quirks.c                          | 13 +++
 net/devlink/core.c                            |  4 +-
 net/devlink/dev.c                             |  8 ++
 net/devlink/devl_internal.h                   | 21 ++++-
 net/devlink/health.c                          |  3 +-
 net/devlink/netlink.c                         | 47 +++++++---
 net/devlink/netlink_gen.c                     |  4 +-
 net/devlink/netlink_gen.h                     |  5 ++
 net/devlink/region.c                          |  3 +-
 .../selftests/drivers/net/mlxsw/pci_reset.sh  | 58 ++++++++++++
 14 files changed, 248 insertions(+), 31 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/pci_reset.sh

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 18, 2023, 5:40 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 15 Nov 2023 13:17:09 +0100 you wrote:
> Ido Schimmel writes:
> 
> This patchset changes mlxsw to issue a PCI reset during probe and
> devlink reload so that the PCI firmware could be upgraded without a
> reboot.
> 
> Unlike the old version of this patchset [1], in this version the driver
> no longer tries to issue a PCI reset by triggering a PCI link toggle on
> its own, but instead calls the PCI core to issue the reset.
> 
> [...]

Here is the summary with links:
  - [net-next,01/14] devlink: Move private netlink flags to C file
    https://git.kernel.org/netdev/net-next/c/526dd6d7877b
  - [net-next,02/14] devlink: Acquire device lock during netns dismantle
    https://git.kernel.org/netdev/net-next/c/e21c52d7814f
  - [net-next,03/14] devlink: Enable the use of private flags in post_doit operations
    (no matching commit)
  - [net-next,04/14] devlink: Allow taking device lock in pre_doit operations
    https://git.kernel.org/netdev/net-next/c/d32c38256db3
  - [net-next,05/14] devlink: Acquire device lock during reload command
    https://git.kernel.org/netdev/net-next/c/bf6b200bc80d
  - [net-next,06/14] devlink: Add device lock assert in reload operation
    https://git.kernel.org/netdev/net-next/c/527a07e176ea
  - [net-next,07/14] PCI: Add no PM reset quirk for NVIDIA Spectrum devices
    https://git.kernel.org/netdev/net-next/c/3ed48c80b28d
  - [net-next,08/14] PCI: Add debug print for device ready delay
    https://git.kernel.org/netdev/net-next/c/0a5ef95923e0
  - [net-next,09/14] mlxsw: Extend MRSR pack() function to support new commands
    https://git.kernel.org/netdev/net-next/c/e6dbab40fa09
  - [net-next,10/14] mlxsw: pci: Rename mlxsw_pci_sw_reset()
    https://git.kernel.org/netdev/net-next/c/bdf85f3a695f
  - [net-next,11/14] mlxsw: pci: Move software reset code to a separate function
    (no matching commit)
  - [net-next,12/14] mlxsw: pci: Add support for new reset flow
    https://git.kernel.org/netdev/net-next/c/f257c73e5356
  - [net-next,13/14] mlxsw: pci: Implement PCI reset handlers
    https://git.kernel.org/netdev/net-next/c/5e12d0898583
  - [net-next,14/14] selftests: mlxsw: Add PCI reset test
    https://git.kernel.org/netdev/net-next/c/af51d6bd0b13

You are awesome, thank you!