* Re: [PATCH net-next 07/14] PCI: Add no PM reset quirk for NVIDIA Spectrum devices
[not found] ` <fe4156c6b9d0f7e8478ae93137586ec88051013d.1700047319.git.petrm@nvidia.com>
@ 2023-11-17 15:21 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2023-11-17 15:21 UTC (permalink / raw)
To: Petr Machata
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, Ido Schimmel, Amit Cohen, mlxsw, Bjorn Helgaas, linux-pci
+ linux-pci@vger.kernel.org
On Wed, Nov 15, 2023 at 01:17:16PM +0100, Petr Machata wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> Spectrum-{1,2,3,4} devices report that a D3hot->D0 transition causes a
> reset (i.e., they advertise NoSoftRst-). However, this transition does
> not have any effect on the device: It continues to be operational and
> network ports remain up. Advertising this support makes it seem as if a
> PM reset is viable for these devices. Mark it as unavailable to skip it
> when testing reset methods.
>
> Before:
>
> # cat /sys/bus/pci/devices/0000\:03\:00.0/reset_method
> pm bus
>
> After:
>
> # cat /sys/bus/pci/devices/0000\:03\:00.0/reset_method
> bus
>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Petr Machata <petrm@nvidia.com>
Thanks,
my understanding is that this matches the use-case for which
quirk_no_pm_reset was introduced.
> ---
> drivers/pci/quirks.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index ea476252280a..d208047d1b8f 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -3786,6 +3786,19 @@ static void quirk_no_pm_reset(struct pci_dev *dev)
> DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_ATI, PCI_ANY_ID,
> PCI_CLASS_DISPLAY_VGA, 8, quirk_no_pm_reset);
>
> +/*
> + * Spectrum-{1,2,3,4} devices report that a D3hot->D0 transition causes a reset
> + * (i.e., they advertise NoSoftRst-). However, this transition does not have
> + * any effect on the device: It continues to be operational and network ports
> + * remain up. Advertising this support makes it seem as if a PM reset is viable
> + * for these devices. Mark it as unavailable to skip it when testing reset
> + * methods.
> + */
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, 0xcb84, quirk_no_pm_reset);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, 0xcf6c, quirk_no_pm_reset);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, 0xcf70, quirk_no_pm_reset);
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, 0xcf80, quirk_no_pm_reset);
> +
> /*
> * Thunderbolt controllers with broken MSI hotplug signaling:
> * Entire 1st generation (Light Ridge, Eagle Ridge, Light Peak) and part
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next 08/14] PCI: Add debug print for device ready delay
[not found] ` <63fca173195f5a9d3a2b78da700650a29cf80f96.1700047319.git.petrm@nvidia.com>
@ 2023-11-17 15:23 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2023-11-17 15:23 UTC (permalink / raw)
To: Petr Machata
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, Ido Schimmel, Amit Cohen, mlxsw, Bjorn Helgaas, linux-pci
+ linux-pci@vger.kernel.org
On Wed, Nov 15, 2023 at 01:17:17PM +0100, Petr Machata wrote:
> From: Ido Schimmel <idosch@nvidia.com>
>
> Currently, the time it took a PCI device to become ready after reset is
> only printed if it was longer than 1000ms ('PCI_RESET_WAIT'). However,
> for debugging purposes it is useful to know this time even if it was
> shorter. For example, with the device I am working on, hardware
> engineers asked to verify that it becomes ready on the first try (no
> delay).
>
> To that end, add a debug level print that can be enabled using dynamic
> debug. Example:
>
> # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset
> # dmesg -c | grep ready
> # echo "file drivers/pci/pci.c +p" > /sys/kernel/debug/dynamic_debug/control
> # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset
> # dmesg -c | grep ready
> [ 396.060335] mlxsw_spectrum4 0000:01:00.0: ready 0ms after bus reset
> # echo "file drivers/pci/pci.c -p" > /sys/kernel/debug/dynamic_debug/control
> # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset
> # dmesg -c | grep ready
>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
> ---
> drivers/pci/pci.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 55bc3576a985..69d20d585f88 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -1219,6 +1219,9 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)
> if (delay > PCI_RESET_WAIT)
> pci_info(dev, "ready %dms after %s\n", delay - 1,
> reset_type);
> + else
> + pci_dbg(dev, "ready %dms after %s\n", delay - 1,
> + reset_type);
>
> return 0;
> }
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-17 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1700047319.git.petrm@nvidia.com>
[not found] ` <fe4156c6b9d0f7e8478ae93137586ec88051013d.1700047319.git.petrm@nvidia.com>
2023-11-17 15:21 ` [PATCH net-next 07/14] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Simon Horman
[not found] ` <63fca173195f5a9d3a2b78da700650a29cf80f96.1700047319.git.petrm@nvidia.com>
2023-11-17 15:23 ` [PATCH net-next 08/14] PCI: Add debug print for device ready delay Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox