PCI: tegra194: Fix edma desc size for remote EDMA

For Remote EDMA desc size is not updated and this results in
error during IRQ processing. Fix the same

Bug 4130564

Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2909597
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Change-Id: I5129f258a60139fe0f9e6c1226d0faf7c546f488
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2910912
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Nagarjuna Kristam
2023-05-24 10:58:47 +05:30
committed by mobile promotions
parent f93dd37a22
commit ffda313d72

View File

@@ -484,6 +484,7 @@ void *tegra_pcie_edma_initialize(struct tegra_pcie_edma_init_info *info)
ch->type = ch_info->ch_type; ch->type = ch_info->ch_type;
ch->desc_sz = ch_info->num_descriptors; ch->desc_sz = ch_info->num_descriptors;
ch->edma_desc_size = (sizeof(struct edma_dblock)) * ((ch->desc_sz / 2) + 1);
if (prv->is_remote_dma) { if (prv->is_remote_dma) {
ch->dma_iova = ch_info->desc_iova; ch->dma_iova = ch_info->desc_iova;
@@ -497,8 +498,6 @@ void *tegra_pcie_edma_initialize(struct tegra_pcie_edma_init_info *info)
goto dma_iounmap; goto dma_iounmap;
} }
} else { } else {
ch->edma_desc_size = (sizeof(struct edma_dblock)) *
((ch->desc_sz / 2) + 1);
ch->desc = dma_alloc_coherent(prv->dev, ch->edma_desc_size, ch->desc = dma_alloc_coherent(prv->dev, ch->edma_desc_size,
&ch->dma_iova, GFP_KERNEL); &ch->dma_iova, GFP_KERNEL);
if (!ch->desc) { if (!ch->desc) {