On Wed, 10 Sept 2025 at 23:09, Manivannan Sadhasivam via B4 Relay
<devnull+manivannan.sadhasivam.oss.qualcomm.com(a)kernel.org> wrote:
>
> Hi,
>
> This series fixes the long standing issue with ACS in DT platforms. There are
> two fixes in this series, both fixing independent issues on their own, but both
> are needed to properly enable ACS on DT platforms (well, patch 1 is only needed
> for Juno board, but that was a blocker for patch 2, more below...).
>
> Issue(s) background
> ===================
>
> Back in 2024, Xingang Wang first noted a failure in attaching the HiSilicon SEC
> device to QEMU ARM64 pci-root-port device [1]. He then tracked down the issue to
> ACS not being enabled for the QEMU Root Port device and he proposed a patch to
> fix it [2].
>
> Once the patch got applied, people reported PCIe issues with linux-next on the
> ARM Juno Development boards, where they saw failure in enumerating the endpoint
> devices [3][4]. So soon, the patch got dropped, but the actual issue with the
> ARM Juno boards was left behind.
>
> Fast forward to 2024, Pavan resubmitted the same fix [5] for his own usecase,
> hoping that someone in the community would fix the issue with ARM Juno boards.
> But the patch was rightly rejected, as a patch that was known to cause issues
> should not be merged to the kernel. But again, no one investigated the Juno
> issue and it was left behind again.
>
> Now it ended up in my plate and I managed to track down the issue with the help
> of Naresh who got access to the Juno boards in LKFT. The Juno issue is with the
> PCIe switch from Microsemi/IDT, which triggers ACS Source Validation error on
> Completions received for the Configuration Read Request from a device connected
> to the downstream port that has not yet captured the PCIe bus number. As per the
> PCIe spec r6.0 sec 2.2.6.2, "Functions must capture the Bus and Device Numbers
> supplied with all Type 0 Configuration Write Requests completed by the Function
> and supply these numbers in the Bus and Device Number fields of the Requester ID
> for all Requests". So during the first Configuration Read Request issued by the
> switch downstream port during enumeration (for reading Vendor ID), Bus and
> Device numbers will be unknown to the device. So it responds to the Read Request
> with Completion having Bus and Device number as 0. The switch interprets the
> Completion as an ACS Source Validation error and drops the completion, leading
> to the failure in detecting the endpoint device. Though the PCIe spec r6.0, sec
> 6.12.1.1, states that "Completions are never affected by ACS Source Validation".
> This behavior is in violation of the spec.
>
> This issue was already found and addressed with a quirk for a different device
> from Microsemi with 'commit, aa667c6408d2 ("PCI: Workaround IDT switch ACS
> Source Validation erratum")'. Apparently, this issue seems to be documented in
> the erratum #36 of IDT 89H32H8G3-YC, which is not publicly available.
>
> Solution for Juno issue
> =======================
>
> To fix this issue, I've extended the quirk to the Device ID of the switch
> found in Juno R2 boards. I believe the same switch is also present in Juno R1
> board as well.
>
> With Patch 1, the Juno R2 boards can now detect the endpoints even with ACS
> enabled for the Switch downstream ports. Finally, I added patch 2 that properly
> enables ACS for all the PCI devices on DT platforms.
>
> It should be noted that even without patch 2 which enables ACS for the Root
> Port, the Juno boards were failing since 'commit, bcb81ac6ae3c ("iommu: Get
> DT/ACPI parsing into the proper probe path")' as reported in LKFT [6]. I
> believe, this commit made sure pci_request_acs() gets called before the
> enumeration of the switch downstream ports. The LKFT team ended up disabling
> ACS using cmdline param 'pci=config_acs=000000@pci:0:0'. So I added the above
> mentioned commit as a Fixes tag for patch 1.
>
> Also, to mitigate this issue, one could enumerate all the PCIe devices in
> bootloader without enabling ACS (as also noted by Robin in the LKFT thread).
> This will make sure that the endpoint device has a valid bus number when it
> responds to the first Configuration Read Request from the switch downstream
> port. So the ACS Source Validation error doesn't get triggered.
>
> Solution for ACS issue
> ======================
>
> To fix this issue, I've kept the patch from Xingang as is (with rewording of the
> patch subject/description). This patch moves the pci_request_acs() call to
> devm_of_pci_bridge_init(), which gets called during the host bridge
> registration. This makes sure that the 'pci_acs_enable' flag set by
> pci_request_acs() is getting set before the enumeration of the Root Port device.
> So now, ACS will be enabled for all ACS capable devices of DT platforms.
I have applied this patch series on top of Linux next-20250910 and
next-20250911 tags and tested.
>
> [1] https://lore.kernel.org/all/038397a6-57e2-b6fc-6e1c-7c03b7be9d96@huawei.com
> [2] https://lore.kernel.org/all/1621566204-37456-1-git-send-email-wangxingang5@…
> [3] https://lore.kernel.org/all/01314d70-41e6-70f9-e496-84091948701a@samsung.com
> [4] https://lore.kernel.org/all/CADYN=9JWU3CMLzMEcD5MSQGnaLyDRSKc5SofBFHUax6YuT…
> [5] https://lore.kernel.org/linux-pci/20241107-pci_acs_fix-v1-1-185a2462a571@qu…
> [6] https://lists.linaro.org/archives/list/lkft-triage@lists.linaro.org/message…
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam(a)oss.qualcomm.com>
Tested-by: Linux Kernel Functional Testing <lkft(a)linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju(a)linaro.org>
> ---
> Manivannan Sadhasivam (1):
> PCI: Extend pci_idt_bus_quirk() for IDT switch with Device ID 0x8090
>
> Xingang Wang (1):
> iommu/of: Call pci_request_acs() before enumerating the Root Port device
>
> drivers/iommu/of_iommu.c | 1 -
> drivers/pci/of.c | 8 +++++++-
> drivers/pci/probe.c | 2 +-
> 3 files changed, 8 insertions(+), 3 deletions(-)
> ---
> base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
> change-id: 20250910-pci-acs-cb4fa3983a2c
>
> Best regards,
> --
> Manivannan Sadhasivam <manivannan.sadhasivam(a)oss.qualcomm.com>
>
>
--
Linaro LKFT
Hi,
We are a professional manufacturer of e-bicycles, producing over 50,000
units annually and exporting successfully to Europe,
the USA, and Australia. With hundreds of customers and distributors
worldwide, our reputation is built on reliability, quality, and fast
service.
To better serve our European clients, we keep stock in both our EU and
US warehouses, ensuring delivery across the EU within just 3–7 days.
Whether you are interested in purchasing for personal use or
considering becoming an authorized distributor in your region,
we would be glad to support you.
At present, we are promoting two of our best-selling models in our
European warehouse:
20-inch Moped-Style Fat Tire E-Bicycle – Equipped with a 48V 15Ah
battery and a 500W motor, designed for power and style,
perfect for city commuting and leisure rides.
[OUXI-V8-1-768x768.jpg]
26-inch Fat Tire E-Bicycle – Built with a 500W motor and 48V 15Ah
battery, offering excellent performance and range for versatile
terrains.
[cmacewheel-ks26-26-inch-fat-tire-electric-bike-7.jpg]
If you are interested, please share your address and we will calculate
the possible price for you.
We are also open to discussing exclusive distributor partnerships in
your area.
Looking forward to your reply.
Thanks,
Peter Hans
Manufacturer of e-bicycles
send address to unlist
Total jobs: 256
Total errors: 151 (58.98%)
LAVA errors: 0 (0.00%)
Test errors: 132 (51.56%)
Job errors: 5 (1.95%)
Infra errors: 14 (5.47%)
Canceled jobs: 0 (0.00%)
Device type: dragonboard-845c
Total jobs: 114
Total errors: 76 (66.67%)
Error type: Test
Error count: 71 (62.28%)
Error: No match for error type 'Test', message 'lava-test-interactive timed out after 600 seconds'
Count: 14 (12.28%)
IDs:
db845c-02:
8442300 8442306
db845c-03:
8441697 8441698 8442292 8442294 8442304
db845c-04:
8441699 8441701 8441713 8441720 8441815
db845c-06:
8442302
db845c-10:
8441718
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 8 (7.02%)
IDs:
db845c-03:
8441817 8442297
db845c-04:
8434793 8441640 8442286
db845c-06:
8442287 8442298
db845c-10:
8442220
Error: Device NOT found!
Count: 11 (9.65%)
IDs:
db845c-02:
8441756 8441823 8441830 8442288 8442293
db845c-03:
8434796 8441554
db845c-04:
8442218
db845c-06:
8441836
db845c-10:
8441766 8442262
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 581 seconds'
Count: 1 (0.88%)
IDs:
db845c-02:
8442280
Error: No match for error type 'Test', message 'The network seems not available, as the ping command failed'
Count: 1 (0.88%)
IDs:
db845c-03:
8442263
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 595 seconds'
Count: 1 (0.88%)
IDs:
db845c-03:
8442157
Error: No match for error type 'Test', message 'tradefed - adb device lost[476f370a]'
Count: 3 (2.63%)
IDs:
db845c-10:
8441755 8441861 8442156
Error: No match for error type 'Test', message 'tradefed - adb device lost[dd3b965f]'
Count: 6 (5.26%)
IDs:
db845c-02:
8441732 8441759 8441761 8441767 8441881
8442155
Error: No match for error type 'Test', message 'tradefed - adb device lost[e875976d]'
Count: 4 (3.51%)
IDs:
db845c-06:
8441754 8441858 8441877 8442153
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 598 seconds'
Count: 10 (8.77%)
IDs:
db845c-02:
8441854 8441859 8441876
db845c-03:
8441762
db845c-04:
8441539 8441593 8441595 8441763 8441857
db845c-10:
8442152
Error: No match for error type 'Test', message 'tradefed - adb device lost[f3a58ae3]'
Count: 6 (5.26%)
IDs:
db845c-04:
8434799 8441753 8441772 8441781 8441863
8441879
Error: No match for error type 'Test', message 'tradefed - adb device lost[d966d3f5]'
Count: 5 (4.39%)
IDs:
db845c-03:
8434797 8441538 8441555 8441760 8441862
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 592 seconds'
Count: 1 (0.88%)
IDs:
db845c-10:
8441751
Error type: Infrastructure
Error count: 3 (2.63%)
Error: Connection closed
Count: 3 (2.63%)
IDs:
db845c-04:
8441860 8442291
db845c-06:
8442261
Error type: Job
Error count: 2 (1.75%)
Error: No match for error type 'Job', message 'login-action timed out after 873 seconds'
Count: 1 (0.88%)
IDs:
db845c-03:
8441700
Error: No match for error type 'Job', message 'login-action timed out after 832 seconds'
Count: 1 (0.88%)
IDs:
db845c-03:
8441610
Device type: qrb5165-rb5
Total jobs: 101
Total errors: 52 (51.49%)
Error type: Test
Error count: 38 (37.62%)
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 13 (12.87%)
IDs:
rb5-01:
8440818 8441656 8442224
rb5-03:
8440935 8440952 8440953 8441542 8441684
8441806 8441808 8442228
rb5-06:
8440862 8442275
Error: No match for error type 'Test', message 'tradefed - adb device lost[74d67c95]'
Count: 3 (2.97%)
IDs:
rb5-03:
8440891 8441517 8442237
Error: Device NOT found!
Count: 13 (12.87%)
IDs:
rb5-01:
8441559 8441779
rb5-03:
8440859 8440906 8441636 8441652 8441655
8441677 8441678 8441752 8441780 8442230
rb5-06:
8441631
Error: No match for error type 'Test', message 'tradefed - adb device lost[4fc7b22]'
Count: 1 (0.99%)
IDs:
rb5-06:
8441856
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 598 seconds'
Count: 1 (0.99%)
IDs:
rb5-01:
8441850
Error: No match for error type 'Test', message 'tradefed - adb device lost[93dcfd96]'
Count: 3 (2.97%)
IDs:
rb5-01:
8441771 8441837 8441847
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 585 seconds'
Count: 1 (0.99%)
IDs:
rb5-03:
8441846
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 597 seconds'
Count: 1 (0.99%)
IDs:
rb5-03:
8441834
Error: No match for error type 'Test', message 'lava-test-interactive timed out after 600 seconds'
Count: 2 (1.98%)
IDs:
rb5-01:
8440892
rb5-06:
8440894
Error type: Infrastructure
Error count: 11 (10.89%)
Error: Connection closed
Count: 11 (10.89%)
IDs:
rb5-01:
8440864 8440865 8440932 8441545 8441558
8441567 8441599 8441600 8441683 8441783
8442266
Error type: Job
Error count: 3 (2.97%)
Error: No match for error type 'Job', message 'login-action timed out after 875 seconds'
Count: 1 (0.99%)
IDs:
rb5-03:
8441682
Error: No match for error type 'Job', message 'login-action timed out after 876 seconds'
Count: 2 (1.98%)
IDs:
rb5-03:
8440863 8440866
Device type: sm8550-hdk
Total jobs: 26
Total errors: 16 (61.54%)
Error type: Test
Error count: 16 (61.54%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[124d1c34]'
Count: 11 (42.31%)
IDs:
sm8550-hdk-01:
8440913 8440914 8441495 8441503 8441513
8441533 8441546 8441547 8441775 8442245
8442246
Error: No match for error type 'Test', message 'Device NOT found after DUT booted up! adb wait-for-device timed out after 300s'
Count: 2 (7.69%)
IDs:
sm8550-hdk-01:
8440929 8441734
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 593 seconds'
Count: 1 (3.85%)
IDs:
sm8550-hdk-01:
8441728
Error: No match for error type 'Test', message 'lava-test-interactive timed out after 600 seconds'
Count: 1 (3.85%)
IDs:
sm8550-hdk-01:
8441608
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 598 seconds'
Count: 1 (3.85%)
IDs:
sm8550-hdk-01:
8441514
Device type: rk3399-rock-pi-4b
Total jobs: 1
Total errors: 0 (0.00%)
Device type: x86
Total jobs: 1
Total errors: 0 (0.00%)
Device type: hi6220-hikey-r2
Total jobs: 6
Total errors: 4 (66.67%)
Error type: Test
Error count: 4 (66.67%)
Error: No match for error type 'Test', message 'tradefed - adb device lost[8D6E5F00030E051]'
Count: 2 (33.33%)
IDs:
hikey-6220-r2-02:
8441549 8441814
Error: No match for error type 'Test', message 'tradefed - adb device lost[2047EDF7003CEE68]'
Count: 1 (16.67%)
IDs:
hikey-6220-r2-01:
8441730
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 591 seconds'
Count: 1 (16.67%)
IDs:
hikey-6220-r2-02:
8441609
Device type: hi960-hikey
Total jobs: 7
Total errors: 3 (42.86%)
Error type: Test
Error count: 3 (42.86%)
Error: No match for error type 'Test', message 'lava-docker-test-shell timed out after 598 seconds'
Count: 2 (28.57%)
IDs:
hi960-hikey-01:
8441552 8441607
Error: No match for error type 'Test', message 'tradefed - adb device lost[6A522E130177F475]'
Count: 1 (14.29%)
IDs:
hi960-hikey-01:
8441550