[PATCH v8 1/5] PCI: dwc: ep: Clear MSI iATU mapping in dw_pcie_ep_cleanup()

Manivannan Sadhasivam mani at kernel.org
Tue Jul 28 04:56:18 PDT 2026


On Mon, Jul 27, 2026 at 06:18:37PM +0200, Niklas Cassel wrote:
> On Mon, May 18, 2026 at 08:29:13PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> > From: Manivannan Sadhasivam <manivannan.sadhasivam at oss.qualcomm.com>
> > 
> > The MSI iATU mapping is currently only cleared when the endpoint is
> > stopped via configfs or when the host updates the MSI address/size.
> > This avoids redundant iATU reconfiguration every time the endpoint
> > raises an MSI interrupt.
> > 
> > However, a fundamental reset triggered by PERST# assert/deassert
> > resets all iATU inbound/outbound registers without going through the
> > configfs stop path. If the host also retains the same MSI address/size
> > after PERST# deassert, the driver never clears the stale MSI iATU
> > mapping. It then continues using this stale mapping to raise the MSI
> > interrupts, which can cause IOMMU faults and MSI failures on the host.
> > 
> > Fix this by clearing the MSI iATU mapping inside dw_pcie_ep_cleanup(),
> > which is already called as part of the PERST# assert/deassert sequence.
> > This unmaps the MSI iATU region and sets the msi_iatu_mapped flag to
> > false, ensuring that dw_pcie_ep_raise_msi_irq() performs a fresh iATU
> > mapping on its next invocation, regardless of whether the host changed
> > the MSI address/size.
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at oss.qualcomm.com>
> 
> Doesn't this need a Fixes tag?
> 

It needs one yes!

> 
> Side node: It seems like this series does no longer apply on pci/next.
> 
> Perhaps need to rebase and resend?
> 

Yep. I'm preparing th next version. Will post it asap.

- Mani

-- 
மணிவண்ணன் சதாசிவம்



More information about the Linux-rockchip mailing list