From 75c8d2fc98bf09c5f068d3bc1c0669d144097129 Mon Sep 17 00:00:00 2001 From: Gauri Joshi Date: Wed, 11 Aug 2021 14:50:24 -0700 Subject: [PATCH] msm: ep-pcie: Enable global IRQ after enumeration The global irqs are being enabled before EP driver has completed successful link enumeration. This causes a race condition where the BME IRQ is processed before link up causing the link up to exit before updating the link status. Any further processing results in LINK_DISABLED error. Avoid this scenario by enabling the global interrupts after enumeration has finished. Change-Id: I983a35f461da5d8966cadc9918b5529d16182b47 Signed-off-by: Gauri Joshi --- drivers/platform/msm/ep_pcie/ep_pcie_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/msm/ep_pcie/ep_pcie_core.c b/drivers/platform/msm/ep_pcie/ep_pcie_core.c index 710c4a647f67..219e0e97b794 100644 --- a/drivers/platform/msm/ep_pcie/ep_pcie_core.c +++ b/drivers/platform/msm/ep_pcie/ep_pcie_core.c @@ -2603,6 +2603,7 @@ int32_t ep_pcie_irq_init(struct ep_pcie_dev_t *dev) INIT_WORK(&dev->handle_d3cold_work, handle_d3cold_func); if (dev->aggregated_irq) { + irq_set_status_flags(dev->irq[EP_PCIE_INT_GLOBAL].num, IRQ_NOAUTOEN); ret = devm_request_irq(pdev, dev->irq[EP_PCIE_INT_GLOBAL].num, ep_pcie_handle_global_irq, @@ -3446,6 +3447,7 @@ static int ep_pcie_probe(struct platform_device *pdev) qcom_edma_init(&pdev->dev); + enable_irq(ep_pcie_dev.irq[EP_PCIE_INT_GLOBAL].num); return 0; irq_deinit: