]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
PCI: iproc: Restore .map_irq() for the platform bus driver
authorMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Thu, 30 Apr 2026 02:16:28 +0000 (14:16 +1200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 18 Jun 2026 15:16:57 +0000 (10:16 -0500)
Commit b64aa11eb2dd ("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: b64aa11eb2dd ("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
drivers/pci/controller/pcie-iproc-bcma.c
drivers/pci/controller/pcie-iproc-platform.c
drivers/pci/controller/pcie-iproc.c
drivers/pci/controller/pcie-iproc.h

index 99a99900444de1f68503384558e677cac20ae784..593418c2bc3aa61a09b2b6c14c3c0532586f7a72 100644 (file)
@@ -64,7 +64,7 @@ static int iproc_bcma_pcie_probe(struct bcma_device *bdev)
        if (ret)
                return ret;
 
-       pcie->map_irq = iproc_bcma_pcie_map_irq;
+       bridge->map_irq = iproc_bcma_pcie_map_irq;
 
        bcma_set_drvdata(bdev, pcie);
 
index 0cb78c583c7ea43306794de7731ca551ece455a9..4c9a0c4bb923e6f6df335f7649c5f62aff41d4e6 100644 (file)
@@ -98,7 +98,7 @@ static int iproc_pltfm_pcie_probe(struct platform_device *pdev)
        switch (pcie->type) {
        case IPROC_PCIE_PAXC:
        case IPROC_PCIE_PAXC_V2:
-               pcie->map_irq = NULL;
+               bridge->map_irq = NULL;
                break;
        default:
                break;
index ccf71993ea3595e0f41835c3f8c1ef408b6e7470..c22d0aecaaac55da50ca192e5fba174dc365219e 100644 (file)
@@ -1502,7 +1502,6 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
 
        host->ops = &iproc_pcie_ops;
        host->sysdata = pcie;
-       host->map_irq = pcie->map_irq;
 
        ret = pci_host_probe(host);
        if (ret < 0) {
index 969ded03b8c2daf4ebb953b0997ac51c6fa3823c..c4443f236ca3bbfe2bf4aa07e18f839a71edef31 100644 (file)
@@ -61,7 +61,6 @@ struct iproc_msi;
  * @base_addr: PCIe host controller register base physical address
  * @mem: host bridge memory window resource
  * @phy: optional PHY device that controls the Serdes
- * @map_irq: function callback to map interrupts
  * @ep_is_internal: indicates an internal emulated endpoint device is connected
  * @iproc_cfg_read: indicates the iProc config read function should be used
  * @rej_unconfig_pf: indicates the root complex needs to detect and reject
@@ -91,7 +90,6 @@ struct iproc_pcie {
        phys_addr_t base_addr;
        struct resource mem;
        struct phy *phy;
-       int (*map_irq)(const struct pci_dev *, u8, u8);
        bool ep_is_internal;
        bool iproc_cfg_read;
        bool rej_unconfig_pf;