From: Petr Machata <petrm@nvidia.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
<netdev@vger.kernel.org>
Cc: Ido Schimmel <idosch@nvidia.com>, Petr Machata <petrm@nvidia.com>,
"Amit Cohen" <amcohen@nvidia.com>, <mlxsw@nvidia.com>
Subject: [PATCH net-next 00/14] mlxsw: Add support for new reset flow
Date: Wed, 15 Nov 2023 13:17:09 +0100 [thread overview]
Message-ID: <cover.1700047319.git.petrm@nvidia.com> (raw)
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
--
2.41.0
next reply other threads:[~2023-11-15 12:19 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 12:17 Petr Machata [this message]
2023-11-15 12:17 ` [PATCH net-next 01/14] devlink: Move private netlink flags to C file Petr Machata
2023-11-17 15:24 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 02/14] devlink: Acquire device lock during netns dismantle Petr Machata
2023-11-17 15:49 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 03/14] devlink: Enable the use of private flags in post_doit operations Petr Machata
2023-11-17 15:49 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 04/14] devlink: Allow taking device lock in pre_doit operations Petr Machata
2023-11-17 15:23 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 05/14] devlink: Acquire device lock during reload command Petr Machata
2023-11-17 15:51 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 06/14] devlink: Add device lock assert in reload operation Petr Machata
2023-11-17 15:51 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 07/14] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Petr Machata
2023-11-17 15:21 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 08/14] PCI: Add debug print for device ready delay Petr Machata
2023-11-17 15:23 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 09/14] mlxsw: Extend MRSR pack() function to support new commands Petr Machata
2023-11-17 15:51 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 10/14] mlxsw: pci: Rename mlxsw_pci_sw_reset() Petr Machata
2023-11-17 15:53 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 11/14] mlxsw: pci: Move software reset code to a separate function Petr Machata
2023-11-17 15:53 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 12/14] mlxsw: pci: Add support for new reset flow Petr Machata
2023-11-17 15:53 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 13/14] mlxsw: pci: Implement PCI reset handlers Petr Machata
2023-11-17 15:54 ` Simon Horman
2023-11-15 12:17 ` [PATCH net-next 14/14] selftests: mlxsw: Add PCI reset test Petr Machata
2023-11-17 15:21 ` Simon Horman
2023-11-18 17:40 ` [PATCH net-next 00/14] mlxsw: Add support for new reset flow patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1700047319.git.petrm@nvidia.com \
--to=petrm@nvidia.com \
--cc=amcohen@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).