Skip to content

Commit 430ce43

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 61693e4 commit 430ce43

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
@@ -2251,6 +2251,7 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev)
22512251
static void tegra_pcie_dw_remove(struct platform_device *pdev)
22522252
{
22532253
struct tegra_pcie_dw *pcie = platform_get_drvdata(pdev);
2254+
struct dw_pcie_ep *ep = &pcie->pci.ep;
22542255

22552256
if (pcie->of_data->mode == DW_PCIE_RC_TYPE) {
22562257
if (!pcie->link_state)
@@ -2262,6 +2263,7 @@ static void tegra_pcie_dw_remove(struct platform_device *pdev)
22622263
} else {
22632264
disable_irq(pcie->pex_rst_irq);
22642265
pex_ep_event_pex_rst_assert(pcie);
2266+
dw_pcie_ep_deinit(ep);
22652267
}
22662268

22672269
pm_runtime_disable(pcie->dev);

0 commit comments

Comments
 (0)