serial: tegra: Correct shutdown of UARTs
authorJon Hunter <jonathanh@nvidia.com>
Tue, 5 May 2015 14:17:58 +0000 (15:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2015 17:12:19 +0000 (19:12 +0200)
commitd92aca3a76662d2da8fe843ab124c45b47ea127d
treec4f29d50055518e0e76a4e4573d7b3b3b1cef9d4
parent49433c802cb3405e62d3394b9c663f6c9ad329e5
serial: tegra: Correct shutdown of UARTs

There are two issues in the shutdown path of the UARTs which are:
1. The function tegra_uart_shutdown() calls tegra_uart_flush_buffer()
   to stop DMA TX transfers. However, tegra_uart_flush_buffer() is
   called after the DMA channels have already been freed and so actually
   does nothing.
2. The function that frees the DMA channels
   (tegra_uart_dma_channel_free()), unmaps the dma buffer before
   freeing the DMA channel and does not ensure the DMA has been
   stopped.

Resolve this by fixing the code in tegra_uart_dma_channel_free() to
ensure the DMA is stopped, free the DMA channel and then unmap the DMA
buffer. Finally, remove the unnecessary call to tegra_uart_flush_buffer().

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial-tegra.c
This page took 0.026913 seconds and 5 git commands to generate.