Skip to content

Commit 1e87716

Browse files
Vidya Sagargregkh
authored andcommitted
PCI: tegra194: Free up Endpoint resources during remove()
[ Upstream commit 8870f02 ] Free up the resources during remove() that were acquired by the DesignWare driver for the Endpoint mode during probe(). Fixes: bb617cb ("PCI: tegra194: Clean up the exit path for Endpoint mode") Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Vidya Sagar <vidyas@nvidia.com> Link: https://patch.msgid.link/20260324190755.1094879-11-mmaddireddy@nvidia.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent e697ea9 commit 1e87716

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,6 +2285,7 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev)
22852285
static void tegra_pcie_dw_remove(struct platform_device *pdev)
22862286
{
22872287
struct tegra_pcie_dw *pcie = platform_get_drvdata(pdev);
2288+
struct dw_pcie_ep *ep = &pcie->pci.ep;
22882289

22892290
if (pcie->of_data->mode == DW_PCIE_RC_TYPE) {
22902291
if (!pcie->link_state)
@@ -2296,6 +2297,7 @@ static void tegra_pcie_dw_remove(struct platform_device *pdev)
22962297
} else {
22972298
disable_irq(pcie->pex_rst_irq);
22982299
pex_ep_event_pex_rst_assert(pcie);
2300+
dw_pcie_ep_deinit(ep);
22992301
}
23002302

23012303
pm_runtime_disable(pcie->dev);

0 commit comments

Comments
 (0)