pci: epf: dma-test: Clear bar only for T23x

During EP deinit, BAR is cleared. However, For T26x, this notification
is triggered from stop() ops callback. Both stop and clear bar executes
on EPC mutex lock, resulting in deadlock.
Since during EP deinit all EP registers are cleared, clear_bar execution
is not needed.

Bug 4567932

Change-Id: I7b28a85a4da51bdaf5228b6462fb723758c46753
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3171420
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nagarjuna Kristam
2024-07-09 16:20:58 +05:30
committed by mobile promotions
parent b8d1d9a28e
commit c0896b1af7

View File

@@ -270,16 +270,13 @@ static int pcie_dma_epf_core_deinit(struct pci_epf *epf)
if (epfnv->chip_id == TEGRA234)
bar = BAR_0;
else
bar = BAR_1;
epf_bar = &epf->bar[bar];
epfnv->edma.cookie = NULL;
epf_bar_virt->rp_phy_addr = 0;
tegra_pcie_dma_deinit(&cookie);
if (epfnv->chip_id == TEGRA234)
lpci_epc_clear_bar(epc, epf->func_no, epf_bar);
if (epfnv->chip_id == TEGRA264)
lpci_epc_clear_bar(epc, epf->func_no, &epf->bar[BAR_2]);
return 0;
}
#endif