• Jon Hunter's avatar
    serial: tegra: Correct shutdown of UARTs · d92aca3a
    Jon Hunter authored
    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: default avatarJon Hunter <jonathanh@nvidia.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d92aca3a
serial-tegra.c 37.7 KB