mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Cavallari <Nicolas.Cavallari@green-communications.fr>
To: Robin Murphy <robin.murphy@arm.com>,
	iommu@lists.linux.dev, linux-pci@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"Rob Herring (Arm)" <robh@kernel.org>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Jason Gunthorpe <jgg@nvidia.com>,
	regressions@lists.linux.dev
Subject: Re: [REGRESSION] Re: imx8 PCI regression since "iommu: Get DT/ACPI parsing into the proper probe path"
Date: Mon, 19 Jan 2026 13:53:01 +0100	[thread overview]
Message-ID: <154d0ccb-00d8-4e7b-ab6e-c798c86c5e96@green-communications.fr> (raw)
In-Reply-To: <4da29d46-9a80-4ec4-b6b8-6c9457eed481@arm.com>

Le 16/01/2026 à 18:24, Robin Murphy a écrit :
> On 2026-01-16 4:52 pm, Nicolas Cavallari wrote:
>> +cc regressions ML
>>
>> Le 13/01/2026 à 10:17, Nicolas Cavallari a écrit :
>>> +cc patch author & reviewers
>>>
>>> On 1/9/26 17:22, Nicolas Cavallari wrote:
>>>> When upgrading from 6.12 to a 6.18 kernel, I noticed that a PCI
>>>> Ethernet adapter (Microchip LAN7430) would hang under load and not
>>>> recover.  When that happens, some of its registers indicate it is
>>>> failing to do DMA reads, so cannot reclaim entries on its ring buffer.
>>>>
>>>> I bisected the problem into this commit:
>>>>
>>>> commit bcb81ac6ae3c2ef95b44e7b54c3c9522364a245c
>>>> Author: Robin Murphy <robin.murphy@arm.com>
>>>> Date:   Fri Feb 28 15:46:33 2025 +0000
>>>>
>>>>        iommu: Get DT/ACPI parsing into the proper probe path
>>>>
>>>> The problem still exists on 6.19-rc1, on pci/next (29a77b4897f1) and on
>>>> iommu/master (360e85353769) trees.  Reverting the commit fixes the
>>>> issue.
>>
>> The problem persists on 6.19-rc5
>>
>>>> The system is a Gateworks GW7200, which is a i.MX 8 Mini connected to a
>>>> Pericom
>>>> PI7C9X2G404 4-port switch connected to the LAN7430 chip.
>>>>
>>>> -[0000:00]---00.0-[01-ff]----00.0-[02-05]--+-01.0-[03]----00.0
>>>>                                               +-02.0-[04]--
>>>>                                               \-03.0-[05]----00.0
>>>>
>>>> The problem only occurs when there is at least another PCI device in use
>>>> on the
>>>> switch.  It does not happen if the LAN7430 is the only PCI device, or if
>>>> the
>>>> other devices are not actively used.  For example i can reproduce it
>>>> with an
>>>> ath9k wireless network adapter when it is up and running, but not when
>>>> it is
>>>> down or its driver is not loaded.
>>>>
>>>> I suspect that other PCI devices have similar issues, but the LAN7430 is
>>>> the
>>>> easiest one to diagnose, as it hangs within seconds with an iperf3 --
>>>> bidir -u
>>>> -b 200M and its register map are public.
>>>>
>>>> I couldn't find an way to dump the PCI address translation mapping from
>>>> userspace.
>>>> I would be happy to provide more information or test patches.
>>
>> I debugged it further, it seems to be mostly a PCI issue since the
>> system does not actually have an IOMMU.
> 
> Indeed, I was figuring this had to be another case of a switch with
> wonky ACS - do Mani's patches adjusting ACS enablement make any difference?
> 
> https://lore.kernel.org/all/20260102-pci_acs-v3-1-72280b94d288@oss.qualcomm.com/

With this series, ACS is still enabled and eth1 is still failing under load.

> Although in this case I guess the issue is arguably more that we're
> requesting ACS at all, before we know that there's actually an IOMMU
> present to warrant it. Clearly the best option would be to figure out if
> the switch behaviour itself can be fixed somehow, but perhaps something
> like this might help paper over the issue for now (but I'd have to test
> it to make sure it doesn't break IOMMUs again...)
> 
> ----->8-----
> diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
> index 6b989a62def2..837cc0b5ace4 100644
> --- a/drivers/iommu/of_iommu.c
> +++ b/drivers/iommu/of_iommu.c
> @@ -141,10 +141,12 @@ int of_iommu_configure(struct device *dev, struct
> device_node *master_np,
>    			.np = master_np,
>    		};
> 
> -		pci_request_acs();
>    		err = pci_for_each_dma_alias(to_pci_dev(dev),
>    					     of_pci_iommu_init, &info);
> -		of_pci_check_device_ats(dev, master_np);
> +		if (!err) {
> +			pci_request_acs();
> +			of_pci_check_device_ats(dev, master_np);
> +		}
>    	} else {
>    		err = of_iommu_configure_device(master_np, dev, id);
>    	}
> -----8<-----

With this, ACS is indeed disabled and eth1 no longer fails under load, but I 
have also identified an errata on the PCIe switch that causes ACS to fail. I've 
sent another message in this thread.

      reply	other threads:[~2026-01-19 12:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a1d926f0-4cb5-4877-a4df-617902648d80@green-communications.fr>
2026-01-13  9:17 ` Nicolas Cavallari
2026-01-16 16:52   ` [REGRESSION] " Nicolas Cavallari
2026-01-16 17:10     ` Jason Gunthorpe
2026-01-16 17:35       ` Robin Murphy
2026-01-19 12:51       ` Nicolas Cavallari
2026-01-16 17:24     ` Robin Murphy
2026-01-19 12:53       ` Nicolas Cavallari [this message]

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=154d0ccb-00d8-4e7b-ab6e-c798c86c5e96@green-communications.fr \
    --to=nicolas.cavallari@green-communications.fr \
    --cc=bhelgaas@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.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

all inboxes | Powered by JetHome®