Skip to content

Commit 5ec5879

Browse files
committed
Merge branch 'pci/controller/dra7xx'
- Request IRQF_ONESHOT for 'dra7xx-pcie-main' IRQ since the primary handler is NULL (Siddharth Vadapalli) - Handle IRQ request errors during root port and endpoint probe (Siddharth Vadapalli) * pci/controller/dra7xx: PCI: dra7xx: Fix error handling when IRQ request fails in probe PCI: dra7xx: Fix threaded IRQ request for "dra7xx-pcie-main" IRQ
2 parents da71957 + 4d60f6d commit 5ec5879

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

drivers/pci/controller/dwc/pci-dra7xx.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,14 +850,21 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
850850
dra7xx->mode = mode;
851851

852852
ret = devm_request_threaded_irq(dev, irq, NULL, dra7xx_pcie_irq_handler,
853-
IRQF_SHARED, "dra7xx-pcie-main", dra7xx);
853+
IRQF_SHARED | IRQF_ONESHOT,
854+
"dra7xx-pcie-main", dra7xx);
854855
if (ret) {
855856
dev_err(dev, "failed to request irq\n");
856-
goto err_gpio;
857+
goto err_deinit;
857858
}
858859

859860
return 0;
860861

862+
err_deinit:
863+
if (dra7xx->mode == DW_PCIE_RC_TYPE)
864+
dw_pcie_host_deinit(&dra7xx->pci->pp);
865+
else
866+
dw_pcie_ep_deinit(&dra7xx->pci->ep);
867+
861868
err_gpio:
862869
err_get_sync:
863870
pm_runtime_put(dev);

0 commit comments

Comments
 (0)