]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/of: Fix pci_request_acs() before enumerating PCI devices
authorXingang Wang <wangxingang5@huawei.com>
Fri, 21 May 2021 03:03:24 +0000 (03:03 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 20 Aug 2021 21:13:49 +0000 (16:13 -0500)
commit57a4ab1584e6f0a2f8f6075af3986784733909f2
tree4ea504ad50eaa869f5837bd306b184f2232c85f4
parent7cae7849fccee81c20072e3fc9102107837263f3
iommu/of: Fix pci_request_acs() before enumerating PCI devices

When booting with devicetree, pci_request_acs() is called after the
enumeration and initialization of PCI devices, thus ACS is not enabled.

ACS should be enabled when IOMMU is detected for the PCI host bridge, so
check for IOMMU before probe of PCI host and call pci_request_acs() to make
sure ACS will be enabled when enumerating PCI devices.

Fixes: 6bf6c24720d33 ("iommu/of: Request ACS from the PCI core when configuring IOMMU linkage")
Link: https://lore.kernel.org/r/1621566204-37456-1-git-send-email-wangxingang5@huawei.com
Signed-off-by: Xingang Wang <wangxingang5@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/of_iommu.c
drivers/pci/of.c