• Sonic Zhang's avatar
    serial: bfin_5xx: split uart RX lock from uart port lock to avoid deadlock · 0f66e50a
    Sonic Zhang authored
    The RX lock is used to protect the RX buffer from concurrent access in DMA
    mode between the timer and RX interrupt routines.  It is independent from
    the uart lock which is used to protect the TX buffer.  It is possible for
    a uart TX transfer to be started up from the RX interrupt handler if low
    latency is enabled.  So we need to split the locks to avoid deadlocking in
    this situation.
    
    In PIO mode, the RX lock is not necessary because the handle_simple_irq
    and handle_level_irq functions ensure driver interrupt handlers are called
    once on one core.
    
    And now that the RX path has its own lock, the TX interrupt has nothing to
    do with the RX path, so disabling it at the same time.
    Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
    Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    0f66e50a
bfin_serial.h 10.5 KB