Skip to content

Commit ff60910

Browse files
committed
Merge tag 'pci-v5.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fixes from Bjorn Helgaas: - Fix MSIs for platforms with "msi-map" device-tree property, which we broke in v5.13-rc1 (Jean-Philippe Brucker) - Add Krzysztof Wilczyński as PCI reviewer (Lorenzo Pieralisi) * tag 'pci-v5.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/MSI: Fix MSIs for generic hosts that use device-tree's "msi-map" MAINTAINERS: Add Krzysztof as PCI host/endpoint controllers reviewer
2 parents 16f0596 + 85aabbd commit ff60910

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14119,6 +14119,7 @@ F: drivers/pci/controller/pci-v3-semi.c
1411914119
PCI ENDPOINT SUBSYSTEM
1412014120
M: Kishon Vijay Abraham I <[email protected]>
1412114121
M: Lorenzo Pieralisi <[email protected]>
14122+
R: Krzysztof Wilczyński <[email protected]>
1412214123
1412314124
S: Supported
1412414125
F: Documentation/PCI/endpoint/*
@@ -14167,6 +14168,7 @@ F: drivers/pci/controller/pci-xgene-msi.c
1416714168
PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
1416814169
M: Lorenzo Pieralisi <[email protected]>
1416914170
R: Rob Herring <[email protected]>
14171+
R: Krzysztof Wilczyński <[email protected]>
1417014172
1417114173
S: Supported
1417214174
Q: http://patchwork.ozlabs.org/project/linux-pci/list/

drivers/pci/of.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus)
103103
#endif
104104
}
105105

106+
bool pci_host_of_has_msi_map(struct device *dev)
107+
{
108+
if (dev && dev->of_node)
109+
return of_get_property(dev->of_node, "msi-map", NULL);
110+
return false;
111+
}
112+
106113
static inline int __of_pci_pci_compare(struct device_node *node,
107114
unsigned int data)
108115
{

drivers/pci/probe.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,8 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
925925
device_enable_async_suspend(bus->bridge);
926926
pci_set_bus_of_node(bus);
927927
pci_set_bus_msi_domain(bus);
928-
if (bridge->msi_domain && !dev_get_msi_domain(&bus->dev))
928+
if (bridge->msi_domain && !dev_get_msi_domain(&bus->dev) &&
929+
!pci_host_of_has_msi_map(parent))
929930
bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
930931

931932
if (!parent)

include/linux/pci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,13 +2344,15 @@ int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,
23442344
struct device_node;
23452345
struct irq_domain;
23462346
struct irq_domain *pci_host_bridge_of_msi_domain(struct pci_bus *bus);
2347+
bool pci_host_of_has_msi_map(struct device *dev);
23472348

23482349
/* Arch may override this (weak) */
23492350
struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus);
23502351

23512352
#else /* CONFIG_OF */
23522353
static inline struct irq_domain *
23532354
pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; }
2355+
static inline bool pci_host_of_has_msi_map(struct device *dev) { return false; }
23542356
#endif /* CONFIG_OF */
23552357

23562358
static inline struct device_node *

0 commit comments

Comments
 (0)