Skip to content

Commit

Permalink
pci: fix MSI issue part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Zyngier authored and frank-w committed Mar 14, 2021
1 parent f97c65e commit 985198a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions drivers/pci/controller/pci-host-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ int pci_host_common_probe(struct platform_device *pdev)

bridge->sysdata = cfg;
bridge->ops = (struct pci_ops *)&ops->pci_ops;
bridge->msi_domain = true;

return pci_host_probe(bridge);
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,6 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
if (!bus)
return -ENOMEM;

if (bridge->no_msi)
bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI;

bridge->bus = bus;

/* Temporarily move resources off the list */
Expand Down Expand Up @@ -929,6 +926,9 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
device_enable_async_suspend(bus->bridge);
pci_set_bus_of_node(bus);
pci_set_bus_msi_domain(bus);
if (bridge->no_msi ||
(bridge->msi_domain && !bus->dev.msi_domain))
bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI;

if (!parent)
set_dev_node(bus->bridge, pcibus_to_node(bus));
Expand Down
1 change: 1 addition & 0 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ struct pci_host_bridge {
unsigned int preserve_config:1; /* Preserve FW resource setup */
unsigned int size_windows:1; /* Enable root bus sizing */
unsigned int no_msi:1; /* Bridge has no MSI support */
unsigned int msi_domain:1; /* Bridge wants MSI domain */

/* Resource alignment requirements */
resource_size_t (*align_resource)(struct pci_dev *dev,
Expand Down

0 comments on commit 985198a

Please sign in to comment.