mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	iommu@lists.linux.dev, open list <linux-kernel@vger.kernel.org>,
	lkft-triage@lists.linaro.org,
	Linux Regressions <regressions@lists.linux.dev>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Rob Herring <robh@kernel.org>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Anders Roxell <anders.roxell@linaro.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: arm64: juno-r2: SSD detect failed on mainline and next
Date: Fri, 25 Apr 2025 16:18:13 +0100	[thread overview]
Message-ID: <e6db6396-cb1e-4e24-8fd0-3cce388a3913@arm.com> (raw)
In-Reply-To: <03e6283e-2ef7-498c-9460-8411114711e2@arm.com>

On 11/04/2025 8:11 pm, Robin Murphy wrote:
[...]
> OK, I found it, but I'm still not sure what exactly to make of it - it's 
> the pci_request_acs() in of_iommu_configure(), now being called early 
> enough to actually have an effect. Booting with EDK2 already using PCI 
> prior to Linux, here's what I get for `sudo lspci -vv | grep ACSctl` 
> with 6.15-rc1:
> 
>          ACSCtl:    SrcValid+ TransBlk- ReqRedir+ CmpltRedir+ 
> UpstreamFwd+ EgressCtrl- DirectTrans-
>          ACSCtl:    SrcValid+ TransBlk- ReqRedir+ CmpltRedir+ 
> UpstreamFwd+ EgressCtrl- DirectTrans-
>          ACSCtl:    SrcValid+ TransBlk- ReqRedir+ CmpltRedir+ 
> UpstreamFwd+ EgressCtrl- DirectTrans-
>          ACSCtl:    SrcValid+ TransBlk- ReqRedir+ CmpltRedir+ 
> UpstreamFwd+ EgressCtrl- DirectTrans-
>          ACSCtl:    SrcValid+ TransBlk- ReqRedir+ CmpltRedir+ 
> UpstreamFwd+ EgressCtrl- DirectTrans-
>          ACSCtl:    SrcValid+ TransBlk- ReqRedir+ CmpltRedir+ 
> UpstreamFwd+ EgressCtrl- DirectTrans-
> 
> whereas with the 6.14 behaviour they are all '-'. I don't have a working 
> root filesystem with the U-Boot setup, but if I boot it with 
> "pci=config_acs=000000@pci:0:0" then the kernel does assign the bridge 
> windows and discover the ethernet/SATA endpoints again. I can spend some 
> time getting NFS working next week, but if you're able to get lspci 
> output off a machine in the "broken" state easily that would be handy to 
> compare.
> 
> So at this point it would seem to be something about how Linux 
> configures ACS when doing it from scratch. What I don't really know is 
> where to go from there. I do know Juno's possibly a bit odd in that the 
> switch supports ACS, but both the root port and endpoints either side of 
> it don't. Could this be tickling some subtle bug in the PCI layer, and 
> what is EDK2 doing that makes it not happen?

Just following up on where I ran out of ideas. I poked at things a 
little more, and from a process of elimination, the culprit appears to 
be is that we enable ACS source validation on the downstream port while 
its secondary bus is still 0, *then* we get to the "bridge configuration 
invalid" bit and reconfigure the bus numbers, but after that, config 
space accesses to the secondary bus still apparently fail to work as 
expected.

What's now beyond me is whether this is just an ACS quirk of this 
particular switch, and/or whether there's something we could or should 
be doing in the PCI layer.

All I can suggest a this point is that you could at least sidestep the 
problem on the LKFT boards by updating them to a less-ancient version of 
U-Boot which supports PCIe for Juno (looks like that landed in 2020.10), 
which should then configure the switch at boot such that the bus 
numbering doesn't need to change when Linux probes it - that appears to 
be the only "magic" thing that EDK2 is doing.

Thanks,
Robin.

  reply	other threads:[~2025-04-25 15:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31  4:03 Naresh Kamboju
2025-04-02 15:34 ` Robin Murphy
2025-04-02 16:18   ` Sudeep Holla
2025-04-09 15:56   ` Naresh Kamboju
2025-04-10 15:36     ` Robin Murphy
2025-04-11 19:11       ` Robin Murphy
2025-04-25 15:18         ` Robin Murphy [this message]
2025-05-30  9:48           ` Naresh Kamboju

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=e6db6396-cb1e-4e24-8fd0-3cce388a3913@arm.com \
    --to=robin.murphy@arm.com \
    --cc=anders.roxell@linaro.org \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=dan.carpenter@linaro.org \
    --cc=iommu@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=lpieralisi@kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=regressions@lists.linux.dev \
    --cc=robh@kernel.org \
    /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®