Commit cfd2fdfd authored by Manivannan Sadhasivam's avatar Manivannan Sadhasivam Committed by Manivannan Sadhasivam
Browse files

PCI: dwc: Skip PME_Turn_Off broadcast and L2/L3 transition during suspend if link is not up



During system suspend, if the PCIe link is not up, then there is no need
to broadcast PME_Turn_Off message and wait for L2/L3 transition. So skip
them.

Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: default avatarManivannan Sadhasivam <mani@kernel.org>
Tested-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Reviewed-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
Link: https://patch.msgid.link/20251218-pci-dwc-suspend-rework-v2-1-5a7778c6094a@oss.qualcomm.com
parent f994bb8f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1169,8 +1169,11 @@ static int dw_pcie_pme_turn_off(struct dw_pcie *pci)
int dw_pcie_suspend_noirq(struct dw_pcie *pci)
{
	u8 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
	int ret = 0;
	u32 val;
	int ret;

	if (!dw_pcie_link_up(pci))
		goto stop_link;

	/*
	 * If L1SS is supported, then do not put the link into L2 as some
@@ -1205,6 +1208,7 @@ int dw_pcie_suspend_noirq(struct dw_pcie *pci)
	 */
	udelay(1);

stop_link:
	dw_pcie_stop_link(pci);
	if (pci->pp.ops->deinit)
		pci->pp.ops->deinit(&pci->pp);