]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PCI: imx6: Delay link start until configfs 'start' written
authorRichard Zhu <hongxing.zhu@nxp.com>
Fri, 22 Aug 2025 20:40:52 +0000 (16:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:44 +0000 (16:28 +0200)
[ Upstream commit 2e6ea70690ddd1ffa422423fd0d4523e4dfe4b62 ]

According to Documentation/PCI/endpoint/pci-endpoint-cfs.rst, the Endpoint
controller (EPC) should only start the link when userspace writes '1' to
the '/sys/kernel/config/pci_ep/controllers/<EPC>/start' attribute, which
ultimately results in calling imx_pcie_start_link() via
pci_epc_start_store().

To align with the documented behavior, do not start the link automatically
when adding the EP controller.

Fixes: 75c2f26da03f ("PCI: imx6: Add i.MX PCIe EP mode support")
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
[mani: reworded commit subject and description]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250709033722.2924372-3-hongxing.zhu@nxp.com
[ imx_pcie_ltssm_enable() => imx6_pcie_ltssm_enable() ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/controller/dwc/pci-imx6.c

index cedfbd4258631dc0d6b656af7f8e8851446df67b..2bcc86ee14f405bd5bc57278fc71e7b7044bb5a2 100644 (file)
@@ -1098,8 +1098,6 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie,
                dev_err(dev, "failed to initialize endpoint\n");
                return ret;
        }
-       /* Start LTSSM. */
-       imx6_pcie_ltssm_enable(dev);
 
        return 0;
 }