[PATCH v5 5/6] PCI: dwc: Skip PME_Turn_Off message if there is no endpoint connected
Manivannan Sadhasivam
mani at kernel.org
Fri Sep 19 23:33:26 PDT 2025
On Tue, Sep 02, 2025 at 04:01:50PM +0800, Richard Zhu wrote:
> A chip freeze is observed on i.MX7D when PCIe RC kicks off the PM_PME
> message and no any devices are connected on the port.
>
Is it because the controller waits indefinitely for the arrival of the
PME_To_Ack response?
> To workaroud such kind of issue, skip PME_Turn_Off message if there is
> no endpoint connected.
>
> Signed-off-by: Richard Zhu <hongxing.zhu at nxp.com>
Fixes tag is needed and stable list should be CCed.
- Mani
> Reviewed-by: Frank Li <Frank.Li at nxp.com>
> ---
> drivers/pci/controller/dwc/pcie-designware-host.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index 57a1ba08c427..b303a74b0fd7 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -1008,12 +1008,15 @@ int dw_pcie_suspend_noirq(struct dw_pcie *pci)
> u32 val;
> int ret;
>
> - if (pci->pp.ops->pme_turn_off) {
> - pci->pp.ops->pme_turn_off(&pci->pp);
> - } else {
> - ret = dw_pcie_pme_turn_off(pci);
> - if (ret)
> - return ret;
> + /* Skip PME_Turn_Off message if there is no endpoint connected */
> + if (dw_pcie_get_ltssm(pci) > DW_PCIE_LTSSM_DETECT_WAIT) {
> + if (pci->pp.ops->pme_turn_off) {
> + pci->pp.ops->pme_turn_off(&pci->pp);
> + } else {
> + ret = dw_pcie_pme_turn_off(pci);
> + if (ret)
> + return ret;
> + }
> }
>
> if (dwc_quirk(pci, QUIRK_NOL2POLL_IN_PM)) {
> --
> 2.37.1
>
--
மணிவண்ணன் சதாசிவம்
More information about the linux-arm-kernel
mailing list