Re: [PATCH v4 4/4] PCI: dwc: Fix missing iATU setup when ECAM is enabled

Niklas Cassel
2026-01-27T15:02:55Z

On Sat, Jan 24, 2026 at 05:53:36AM +1100, Damien Le Moal wrote:
> On 2026/01/24 5:28, Niklas Cassel wrote:
> > From: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
> >
> > When ECAM is enabled, the driver skipped calling dw_pcie_iatu_setup()
> > before configuring ECAM iATU entries. This left IO and MEM outbound
> > windows unprogrammed, resulting in broken IO transactions. Additionally,
> > dw_pcie_config_ecam_iatu() was only called during host initialization,
> > so ECAM-related iATU entries were not restored after suspend/resume,
> > leading to failures in configuration space access
> >
> > To resolve these issues, the ECAM iATU configuration is moved into
> > dw_pcie_iatu_setup(), and dw_pcie_iatu_setup() is invoked when ECAM is
> > enabled.
> >
> > Furthermore, error checks are added in dw_pcie_prog_outbound_atu() and
> > dw_pcie_prog_inbound_atu() such that an error is returned if trying to
> > program an iATU that is outside the number of iATUs provided by the
> > controller.
> >
> > Fixes: f6fd357f7afb ("PCI: dwc: Prepare the driver for enabling ECAM mechanism using iATU 'CFG Shift Feature'")
> > Reported-by: Maciej W. Rozycki <macro@orcam.me.uk>
> > Closes: https://lore.kernel.org/all/alpine.DEB.2.21.2511280256260.36486@angie.orcam.me.uk/
> > Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
> > Co-developed-by: Niklas Cassel <cassel@kernel.org>
> > Signed-off-by: Niklas Cassel <cassel@kernel.org>
>
> It looks like this patch depends on patch 3, which does not have a Fixes tag. So
> why not squash together patches 3 and 4 ?

I think it would be wrong to squash the patches.

This patch is mostly written by Krishna, and I think it is wrong to squash
a cleanup patch with a fix patch.

It is okay to have a fix patch that is done on top of a cleanup patch.
(It would require a lot more effort to write a fix without the cleanup
having been done first.)

Therefore, I will simply add:
Cc: stable+noautosel@kernel.org # depends on Clean up iATU index usage in dw_pcie_iatu_setup()

Such that stable will see that this patch requires a small dependency.

Kind regards,
Niklas