Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Niklas Cassel <cassel@kernel.org>
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 07:33:16 +0200	[thread overview]
Message-ID: <aDAInK0F0Qh7QTiw@wunner.de> (raw)
In-Reply-To: <aC9OrPAfpzB_A4K2@ryzen>

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?

Thanks,

Lukas

  parent reply	other threads:[~2025-05-23  5:33 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 [this message]
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
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=aDAInK0F0Qh7QTiw@wunner.de \
    --to=lukas@wunner.de \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox