Re: reset_slot() callback not respecting MPS config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux