From: Ido Schimmel <idosch@nvidia.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
Petr Machata <petrm@nvidia.com>,
"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, Amit Cohen <amcohen@nvidia.com>,
mlxsw@nvidia.com, linux-pci@vger.kernel.org,
Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCH net-next 6/6] mlxsw: pci: Add support for new reset flow
Date: Thu, 30 Mar 2023 11:26:30 +0300 [thread overview]
Message-ID: <ZCVHtk/wqTAR4Ejd@shredder> (raw)
In-Reply-To: <20230329111001.44a8c8e0.alex.williamson@redhat.com>
On Wed, Mar 29, 2023 at 11:10:01AM -0600, Alex Williamson wrote:
> I think we don't have it because it's unclear how it's actually
> different from a secondary bus reset from the bridge control register,
> which is what "bus" would do when selected for the example above. Per
> the spec, both must cause a hot reset. It seems this device needs a
> significantly longer delay though.
Assuming you are referring to the 2ms sleep in
pci_reset_secondary_bus(), then yes. In our case, after disabling the
link on the downstream port we need to wait for 500ms before enabling
it.
> Note that hot resets can be generated by a userspace driver with
> ownership of the device and will make use of the pci-core reset
> mechanisms. Therefore if there is not a device specific reset, we'll
> use the standard delays and the device ought not to get itself wedged
> if the link becomes active at an unexpected point relative to a
> firmware update. This might be a point in favor of a device specific
> reset solution in pci-core. Thanks,
I assume you referring to something like this:
# echo 1 > /sys/class/pci_bus/0000:03/device/0000:03:00.0/reset
Doesn't seem to have any effect (network ports remain up, at least).
Anyway, this device is completely managed by the kernel, not a user
space driver. I'm not aware of anyone using this method to reset the
device.
If I understand Bjorn and you correctly, we have two options:
1. Keep the current implementation inside the driver.
2. Call __pci_reset_function_locked() from the driver and move the link
toggling to drivers/pci/quirks.c as a "device_specific" method.
Personally, I don't see any benefit in 2, but we can try to implement
it, see if it even works and then decide.
Please let me know what are your preferences.
Thanks
next prev parent reply other threads:[~2023-03-30 8:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1679502371.git.petrm@nvidia.com>
[not found] ` <c61d07469ecf5d3053442e24d4d050405f466b76.1679502371.git.petrm@nvidia.com>
2023-03-23 9:13 ` [PATCH net-next 6/6] mlxsw: pci: Add support for new reset flow Petr Machata
2023-03-23 16:51 ` Bjorn Helgaas
2023-03-26 13:53 ` Ido Schimmel
2023-03-29 16:01 ` Bjorn Helgaas
2023-03-29 17:10 ` Alex Williamson
2023-03-30 8:26 ` Ido Schimmel [this message]
2023-03-30 18:49 ` Alex Williamson
2023-04-13 8:10 ` Ido Schimmel
2023-04-13 15:26 ` Jakub Kicinski
2023-04-13 10:26 ` Lukas Wunner
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=ZCVHtk/wqTAR4Ejd@shredder \
--to=idosch@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=amcohen@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=helgaas@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.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).