Skip to content

Commit e58aef5

Browse files
markto-atlnzgregkh
authored andcommitted
PCI: iproc: Restore .map_irq() for the platform bus driver
[ Upstream commit 3c2e6cc ] Commit b64aa11 ("PCI: Set bridge map_irq and swizzle_irq to default functions") moved the assignment of default .map_irq() callback to devm_of_pci_bridge_init() and removed the initialization of 'iproc_pcie::map_irq' in platform bus driver. This led to the callback getting assigned the NULL pointer for platform bus driver, thereby breaking the INTx functionality, since 'iproc_pcie::map_irq' overrides the 'pci_host_bridge::map_irq' callback in iproc_pcie_setup(). This issue only affected the iproc platform bus driver as this driver relies on the default callback for non-PAXC controllers. iproc-brcm driver was already providing the custom mapping function, so it was unaffected. Restore the original (and intended) behaviour to use the default map_irq function by removing the local 'iproc_pcie::map_irq' pointer and directly assigning the 'pci_host_bridge::map_irq' callback in iproc-bcma driver. This ensures that the default 'map_irq' callback is used for platform bus driver and only iproc-brcm driver overrides it with a custom one. Fixes: b64aa11 ("PCI: Set bridge map_irq and swizzle_irq to default functions") Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> [mani: commit log] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Ray Jui <ray.jui@broadcom.com> Link: https://patch.msgid.link/20260430021628.1343154-1-mark.tomlinson@alliedtelesis.co.nz Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 722576a commit e58aef5

4 files changed

Lines changed: 2 additions & 5 deletions

File tree

drivers/pci/controller/pcie-iproc-bcma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static int iproc_bcma_pcie_probe(struct bcma_device *bdev)
6464
if (ret)
6565
return ret;
6666

67-
pcie->map_irq = iproc_bcma_pcie_map_irq;
67+
bridge->map_irq = iproc_bcma_pcie_map_irq;
6868

6969
bcma_set_drvdata(bdev, pcie);
7070

drivers/pci/controller/pcie-iproc-platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int iproc_pltfm_pcie_probe(struct platform_device *pdev)
9898
switch (pcie->type) {
9999
case IPROC_PCIE_PAXC:
100100
case IPROC_PCIE_PAXC_V2:
101-
pcie->map_irq = NULL;
101+
bridge->map_irq = NULL;
102102
break;
103103
default:
104104
break;

drivers/pci/controller/pcie-iproc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,6 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
15141514

15151515
host->ops = &iproc_pcie_ops;
15161516
host->sysdata = pcie;
1517-
host->map_irq = pcie->map_irq;
15181517

15191518
ret = pci_host_probe(host);
15201519
if (ret < 0) {

drivers/pci/controller/pcie-iproc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ struct iproc_msi;
6161
* @base_addr: PCIe host controller register base physical address
6262
* @mem: host bridge memory window resource
6363
* @phy: optional PHY device that controls the Serdes
64-
* @map_irq: function callback to map interrupts
6564
* @ep_is_internal: indicates an internal emulated endpoint device is connected
6665
* @iproc_cfg_read: indicates the iProc config read function should be used
6766
* @rej_unconfig_pf: indicates the root complex needs to detect and reject
@@ -91,7 +90,6 @@ struct iproc_pcie {
9190
phys_addr_t base_addr;
9291
struct resource mem;
9392
struct phy *phy;
94-
int (*map_irq)(const struct pci_dev *, u8, u8);
9593
bool ep_is_internal;
9694
bool iproc_cfg_read;
9795
bool rej_unconfig_pf;

0 commit comments

Comments
 (0)