OSDN Git Service

staging: speakup: flush tty buffers and ensure hardware flow control
authorOkash Khawaja <okash.khawaja@gmail.com>
Mon, 15 May 2017 17:45:37 +0000 (18:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 May 2017 12:19:41 +0000 (14:19 +0200)
commit1c5973675cee92d5e8ad3a8a6e53a3e822bae271
tree2ef5bad2d418ac675b709e600b8bf6975e565fda
parent470790eefede39ebc22594ce657f14cc83365aed
staging: speakup: flush tty buffers and ensure hardware flow control

This patch fixes the issue where TTY-migrated synths would take a while
to shut up after hitting numpad enter key. When calling synth_flush,
even though XOFF character is sent as high priority, data buffered in
TTY layer is still sent to the synth. This patch flushes that buffered
data when synth_flush is called.

It also tries to ensure that hardware flow control is enabled, by
setting CRTSCTS using tty's termios.

Reported-by: John Covici <covici@ccs.covici.com>
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/serialio.c
drivers/staging/speakup/speakup_audptr.c
drivers/staging/speakup/speakup_decext.c
drivers/staging/speakup/speakup_dectlk.c
drivers/staging/speakup/speakup_spkout.c
drivers/staging/speakup/spk_ttyio.c
drivers/staging/speakup/spk_types.h
drivers/staging/speakup/synth.c