On Tue, Sep 14, 2021 at 4:55 AM Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx> wrote: > > Commit 375553a93201 ("PCI: Setup ACPI fwnode early and at the same time > with OF") added a call to pci_set_acpi_fwnode() in pci_setup_device(), > which unconditionally clears any fwnode previously set by > pci_set_of_node(). > > pci_set_acpi_fwnode() looks for ACPI_COMPANION(), which only returns the > existing fwnode if it was set by ACPI_COMPANION_SET(). If it was set by > OF instead, ACPI_COMPANION() returns NULL and pci_set_acpi_fwnode() > accidentally clears the fwnode. To fix this, look for any fwnode instead > of just ACPI companions. > > Fixes: 375553a93201 ("PCI: Setup ACPI fwnode early and at the same time with OF") > Signed-off-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx> > --- > v2: Use dev_fwnode() > v1: https://lore.kernel.org/linux-pci/20210913172358.1775381-1-jean-philippe@xxxxxxxxxx/ > This fixes boot of virtio-iommu under OF on v5.15-rc1 > --- > drivers/pci/pci-acpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Rob Herring <robh@xxxxxxxxxx>