• J
    serial: samsung: Clear operation mode on UART shutdown · e91d863d
    Javier Martinez Canillas 提交于
    Exynos serial ports operate either in a DMA-based or interrupt-based
    modes. In DMA-based mode, the UART generates a transfer data request
    and a Transmission (Tx) interrupt in interrupt-based mode.
    
    The Tx IRQ is only unmasked in interrupt-based mode and it was done
    in s3c24xx_serial_start_tx(). Commit ba019a3e ("serial: samsung:
    remove redundant interrupt enabling") removed the IRQ enable on that
    function since it is enabled when the mode is set in enable_tx_pio().
    
    The problem is that enable_tx_pio() is only called if the port mode
    has not been set before but the mode was not cleared on .shutdown().
    
    So if the UART was shutdown and then started up again, the mode set
    will remain and the Tx IRQ won't be unmasked.
    
    This caused a hang on at least Exynos5250, Exynos5420 and Exynos5800
    when the system is rebooted or powered off.
    
    Fixes: ba019a3e ("serial: samsung: remove redundant interrupt enabling")
    Signed-off-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
    Reviewed-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    e91d863d
samsung.c 62.8 KB