mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
pci: epf: dma-test: Fix free_irq during remove
Issue: epf-dma-test driver uses MSI IRQ for CRC handling, however, different IRQ is used when free the same. Fix: Correct IRQ number to free. Correct ordering of free_irq and platform MSI irq free. Bug 4820157 Change-Id: Idbbaed61ddbd45a52e8e833e76c6b64f0fd3e48f Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3204910 Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
8d11854283
commit
b55db09752
@@ -293,20 +293,23 @@ static void pcie_dma_epf_unbind(struct pci_epf *epf)
|
||||
tegra_pcie_dma_deinit(&cookie);
|
||||
|
||||
if (epfnv->chip_id == TEGRA264) {
|
||||
#if defined(NV_MSI_GET_VIRQ_PRESENT) /* Linux v6.1 */
|
||||
irq = msi_get_virq(&pdev->dev, TEGRA264_PCIE_DMA_MSI_CRC_VEC);
|
||||
#else
|
||||
for_each_msi_entry(desc, cdev) {
|
||||
if (desc->platform.msi_index == TEGRA264_PCIE_DMA_MSI_CRC_VEC) {
|
||||
irq = desc->irq;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
free_irq(irq, epfnv);
|
||||
|
||||
#if defined(NV_PLATFORM_MSI_DOMAIN_FREE_IRQS_PRESENT) /* Linux v6.9 */
|
||||
platform_msi_domain_free_irqs(&pdev->dev);
|
||||
#endif
|
||||
#if defined(NV_MSI_GET_VIRQ_PRESENT) /* Linux v6.1 */
|
||||
irq = msi_get_virq(&pdev->dev, 0);
|
||||
#else
|
||||
for_each_msi_entry(desc, cdev) {
|
||||
if (desc->platform.msi_index == 0)
|
||||
irq = desc->irq;
|
||||
}
|
||||
#endif
|
||||
free_irq(irq, epfnv);
|
||||
}
|
||||
|
||||
pci_epc_stop(epc);
|
||||
if (epfnv->chip_id == TEGRA234)
|
||||
bar = BAR_0;
|
||||
|
||||
Reference in New Issue
Block a user