Skip to content

Commit 834c5cf

Browse files
Om Prakash SinghLorenzo Pieralisi
authored andcommitted
PCI: tegra194: Disable interrupts before entering L2
In suspend_noirq() call if link doesn't goto L2, PERST# is asserted to bring link to detect state. However, this is causing surprise link down AER error. Since Kernel is executing noirq suspend calls, AER interrupt is not processed. PME and AER are shared interrupts and PCIe subsystem driver enables wake capability of PME irq during suspend. So this AER will cause suspend failure due to pending AER interrupt. After PCIe link is in L2, interrupts are not expected since PCIe controller will be in reset state. Disable PCIe interrupts before going to L2 state to avoid pending AER interrupt. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Om Prakash Singh <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Bjorn Helgaas <[email protected]> Acked-by: Vidya Sagar <[email protected]>
1 parent 43537cf commit 834c5cf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,16 @@ static void tegra_pcie_dw_pme_turnoff(struct tegra_pcie_dw *pcie)
14931493
return;
14941494
}
14951495

1496+
/*
1497+
* PCIe controller exits from L2 only if reset is applied, so
1498+
* controller doesn't handle interrupts. But in cases where
1499+
* L2 entry fails, PERST# is asserted which can trigger surprise
1500+
* link down AER. However this function call happens in
1501+
* suspend_noirq(), so AER interrupt will not be processed.
1502+
* Disable all interrupts to avoid such a scenario.
1503+
*/
1504+
appl_writel(pcie, 0x0, APPL_INTR_EN_L0_0);
1505+
14961506
if (tegra_pcie_try_link_l2(pcie)) {
14971507
dev_info(pcie->dev, "Link didn't transition to L2 state\n");
14981508
/*

0 commit comments

Comments
 (0)