From: Niklas Cassel <cassel@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Wilfred Mallawa <wilfred.mallawa@wdc.com>,
Bjorn Helgaas <helgaas@kernel.org>,
Damien Le Moal <dlemoal@kernel.org>,
linux-pci@vger.kernel.org
Subject: Re: reset_slot() callback not respecting MPS config
Date: Fri, 23 May 2025 09:02:38 +0200 [thread overview]
Message-ID: <aDAdjie1jGBQ-mKf@ryzen> (raw)
In-Reply-To: <aDAInK0F0Qh7QTiw@wunner.de>
On Fri, May 23, 2025 at 07:33:16AM +0200, Lukas Wunner wrote:
> On Thu, May 22, 2025 at 06:19:56PM +0200, Niklas Cassel wrote:
> > As you know the reset_slot() callback patches were merged recently.
> >
> > Wilfred and I (mostly Wilfred), have been debugging DMA issues after the
> > reset_slot() callback has been invoked. The issue is reproduced when MPS
> > configuration is set to performance, but might be applicable for other
> > MPS configurations as well. The problem appears to be that reset_slot()
> > feature does not respect/restore the MPS configuration.
>
> The Device Control register (and thus the MPS setting) is saved via:
>
> pci_save_state()
> pci_save_pcie_state()
>
> So either you're missing a call to pci_restore_state() after reset,
> or you're missing a call to pci_save_state() after changing MPS,
> or MPS is somehow overwritten after pci_restore_state().
> Which one is it?
I kind of liked the earlier revision of Mani's series where we kicked the
devices off the bus, that way, we would re-use the exact same code paths
as when doing the initial enumeration.
Also, by removing the device, the exact same solution works fine both for
link-down (since the device might never come back again), and for a sysfs
initiated reset.
Anyway, I'm happy with whatever solution that works.
Adding pci_save_state() + pci_restore_state() seems fine, but since things
are not working, I assume that those calls are missing, at least of the
bridge.
Are we also missing similar pci_save_state() + pci_restore_state() calls
for the EP?
Kind regards,
Niklas
next prev parent reply other threads:[~2025-05-23 7:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 16:19 reset_slot() callback not respecting MPS config Niklas Cassel
2025-05-23 5:30 ` Wilfred Mallawa
2025-05-23 5:33 ` Lukas Wunner
2025-05-23 6:23 ` Wilfred Mallawa
2025-05-23 6:39 ` Manivannan Sadhasivam
2025-05-23 14:51 ` Lukas Wunner
2025-05-23 15:30 ` Manivannan Sadhasivam
2025-05-24 12:40 ` Lukas Wunner
2025-05-25 7:59 ` Manivannan Sadhasivam
2025-05-23 7:02 ` Niklas Cassel [this message]
2025-05-23 14:59 ` Lukas Wunner
2025-05-23 15:49 ` Manivannan Sadhasivam
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=aDAdjie1jGBQ-mKf@ryzen \
--to=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=manivannan.sadhasivam@linaro.org \
--cc=wilfred.mallawa@wdc.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 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.