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>
Thu, 3 Nov 2022 02:43:03 +0000 (03:43 +0100)
commit109a951a9f1fd8a34ebd1896cbbd5d5cede880a7
tree76c1f3bd44674a3d4d1ef8310a55e57daac4339b
parentc2087b37d10404220d06f4503ef165ab7835b246
serial: tegra: Read DMA status before terminating

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: e9ea096dd225 ("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>
drivers/tty/serial/serial-tegra.c