All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH net-next 00/12] mlxsw: Add support for new reset flow
@ 2023-10-17  7:42 Ido Schimmel
  2023-10-17  7:42 ` [RFC PATCH net-next 01/12] netdevsim: Block until all devices are released Ido Schimmel
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Ido Schimmel @ 2023-10-17  7:42 UTC (permalink / raw)
  To: netdev, linux-pci
  Cc: davem, kuba, pabeni, edumazet, bhelgaas, alex.williamson, lukas,
	petrm, jiri, mlxsw, Ido Schimmel

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 previous 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
#2-#3 adjust devlink to hold a reference on the associated device and
acquire the device lock during reload. Patch #1 prepares netdevsim for
these devlink changes. See the commit message for more details.

Patches #4-#5 add reset method quirks for NVIDIA Spectrum devices.

Patch #6 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 #7-#9 are straightforward preparations in mlxsw.

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

Patch #11 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 #12 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 (9):
  netdevsim: Block until all devices are released
  devlink: Hold a reference on parent device
  devlink: Acquire device lock during reload
  PCI: Add no PM reset quirk for NVIDIA Spectrum devices
  PCI: Add device-specific reset 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

 drivers/net/ethernet/mellanox/mlxsw/pci.c     | 90 +++++++++++++++++--
 drivers/net/ethernet/mellanox/mlxsw/reg.h     | 16 +++-
 drivers/net/netdevsim/bus.c                   | 12 +++
 drivers/pci/pci.c                             |  3 +
 drivers/pci/quirks.c                          | 42 +++++++++
 net/devlink/core.c                            |  7 +-
 net/devlink/dev.c                             |  8 ++
 net/devlink/devl_internal.h                   | 19 +++-
 net/devlink/health.c                          |  3 +-
 net/devlink/netlink.c                         | 21 +++--
 net/devlink/region.c                          |  3 +-
 .../selftests/drivers/net/mlxsw/pci_reset.sh  | 58 ++++++++++++
 12 files changed, 261 insertions(+), 21 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/pci_reset.sh

-- 
2.40.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-10-25 11:05 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-17  7:42 [RFC PATCH net-next 00/12] mlxsw: Add support for new reset flow Ido Schimmel
2023-10-17  7:42 ` [RFC PATCH net-next 01/12] netdevsim: Block until all devices are released Ido Schimmel
2023-10-19  0:53   ` Jakub Kicinski
2023-10-17  7:42 ` [RFC PATCH net-next 02/12] devlink: Hold a reference on parent device Ido Schimmel
2023-10-17  7:56   ` Jiri Pirko
2023-10-17  8:11     ` Ido Schimmel
2023-10-17  9:01       ` Jiri Pirko
2023-10-17  7:42 ` [RFC PATCH net-next 03/12] devlink: Acquire device lock during reload Ido Schimmel
2023-10-17  8:04   ` Jiri Pirko
2023-10-17  7:42 ` [RFC PATCH net-next 04/12] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Ido Schimmel
2023-10-18 19:40   ` Bjorn Helgaas
2023-10-22  8:23     ` Ido Schimmel
2023-10-17  7:42 ` [RFC PATCH net-next 05/12] PCI: Add device-specific reset " Ido Schimmel
2023-10-17 10:00   ` Lukas Wunner
2023-10-18 20:08   ` Bjorn Helgaas
2023-10-25 11:05     ` Ido Schimmel
2023-10-17  7:42 ` [RFC PATCH net-next 06/12] PCI: Add debug print for device ready delay Ido Schimmel
2023-10-18 19:41   ` Bjorn Helgaas
2023-10-17  7:42 ` [RFC PATCH net-next 07/12] mlxsw: Extend MRSR pack() function to support new commands Ido Schimmel
2023-10-17  7:42 ` [RFC PATCH net-next 08/12] mlxsw: pci: Rename mlxsw_pci_sw_reset() Ido Schimmel
2023-10-17  7:42 ` [RFC PATCH net-next 09/12] mlxsw: pci: Move software reset code to a separate function Ido Schimmel
2023-10-17  7:42 ` [RFC PATCH net-next 10/12] mlxsw: pci: Add support for new reset flow Ido Schimmel
2023-10-17  7:42 ` [RFC PATCH net-next 11/12] mlxsw: pci: Implement PCI reset handlers Ido Schimmel
2023-10-17  7:42 ` [RFC PATCH net-next 12/12] selftests: mlxsw: Add PCI reset test Ido Schimmel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.