summaryrefslogtreecommitdiff
path: root/drivers/dma/idma64.c
diff options
context:
space:
mode:
authorAkhil R <akhilrajeev@nvidia.com>2024-03-15 15:44:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-02 17:35:32 +0300
commit41b0531d118a3241603a914857106b3ab9a42b37 (patch)
tree936963e1680dc0275f1506cae0c33de1f4719f70 /drivers/dma/idma64.c
parent031cd856ab168fb36099a9f696858aa57f1ebda8 (diff)
downloadlinux-41b0531d118a3241603a914857106b3ab9a42b37.tar.xz
dmaengine: tegra186: Fix residual calculation
[ Upstream commit 30f0ced9971b2d8c8c24ae75786f9079489a012d ] The existing residual calculation returns an incorrect value when bytes_xfer == bytes_req. This scenario occurs particularly with drivers like UART where DMA is scheduled for maximum number of bytes and is terminated when the bytes inflow stops. At higher baud rates, it could request the tx_status while there is no bytes left to transfer. This will lead to incorrect residual being set. Hence return residual as '0' when bytes transferred equals to the bytes requested. Fixes: ee17028009d4 ("dmaengine: tegra: Add tegra gpcdma driver") Signed-off-by: Akhil R <akhilrajeev@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20240315124411.17582-1-akhilrajeev@nvidia.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/dma/idma64.c')
0 files changed, 0 insertions, 0 deletions