PCI: layerscape: Add support for link-down notification
authorFrank Li <Frank.Li@nxp.com>
Thu, 20 Jul 2023 13:58:33 +0000 (09:58 -0400)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Thu, 24 Aug 2023 08:06:59 +0000 (10:06 +0200)
Add support to pass link-down notification to the endpoint function
driver so that it can process the LINK_DOWN event.

Link: https://lore.kernel.org/r/20230720135834.1977616-1-Frank.Li@nxp.com
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
drivers/pci/controller/dwc/pci-layerscape-ep.c

index de4c175..e0969ff 100644 (file)
@@ -89,6 +89,7 @@ static irqreturn_t ls_pcie_ep_event_handler(int irq, void *dev_id)
                dev_dbg(pci->dev, "Link up\n");
        } else if (val & PEX_PF0_PME_MES_DR_LDD) {
                dev_dbg(pci->dev, "Link down\n");
+               pci_epc_linkdown(pci->ep.epc);
        } else if (val & PEX_PF0_PME_MES_DR_HRD) {
                dev_dbg(pci->dev, "Hot reset\n");
        }