• Peter Hurley's avatar
    serial: Test for no tx data on tx restart · c557d392
    Peter Hurley authored
    Commit 717f3bba,
    'serial_core: Fix conditional start_tx on ring buffer not empty'
    exposes an incorrect assumption in several drivers' start_tx methods;
    the tx ring buffer can, in fact, be empty when restarting tx while
    performing flow control.
    
    Affected drivers:
    sunsab.c
    ip22zilog.c
    pmac_zilog.c
    sunzilog.c
    m32r_sio.c
    imx.c
    
    Other in-tree serial drivers either are not affected or already
    test for empty tx ring buffer before transmitting.
    
    Test for empty tx ring buffer in start_tx() method, after transmitting
    x_char (if applicable).
    Reported-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
    Cc: Seth Bollinger <sethb@digi.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Sam Ravnborg <sam@ravnborg.org>
    Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
    Cc: stable <stable@vger.kernel.org> # 3.15
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    c557d392
pmac_zilog.c 50.3 KB