]> git.baikalelectronics.ru Git - kernel.git/commit
serial: tegra: Read DMA status before terminating
authorKartik <kkartik@nvidia.com>
Tue, 18 Oct 2022 14:58:06 +0000 (20:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:21 +0000 (11:41 +0100)
commitdb5f767ea8c6bc7589c8c6539b6673af9fe80bfb
tree4d7d7967f7769543208245016af3f7e775da6998
parentd042f3b850c1a495764edca9d44b9bff041e7170
serial: tegra: Read DMA status before terminating

[ Upstream commit 109a951a9f1fd8a34ebd1896cbbd5d5cede880a7 ]

Read the DMA status before terminating the DMA, as doing so deletes
the DMA desc.

Also, to get the correct transfer status information, pause the DMA
using dmaengine_pause() before reading the DMA status.

Fixes: bfdcbdd93b8c ("serial: tegra: add serial driver")
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Signed-off-by: Kartik <kkartik@nvidia.com>
Link: https://lore.kernel.org/r/1666105086-17326-1-git-send-email-kkartik@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/serial-tegra.c