tty: n_gsm: fix missing timer to handle stalled links
authorDaniel Starke <daniel.starke@siemens.com>
Fri, 1 Jul 2022 06:16:47 +0000 (08:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:05 +0000 (14:24 +0200)
commitdd37f657387853623f20c1b2482afbb9cd8ece33
tree55320d8ed96296c648a31618e208d9bc5a786675
parent1018139cbb48905fa2edd87da5b608607a84dc1c
tty: n_gsm: fix missing timer to handle stalled links

[ Upstream commit c568f7086c6e771c77aad13d727c70ef70e07243 ]

The current implementation does not handle the situation that no data is in
the internal queue and needs to be sent out while the user tty fifo is
full.
Add a timer that moves more data from user tty down to the internal queue
which is then serialized on the ldisc. This timer is triggered if no data
was moved from a user tty to the internal queue within 10 * T1.

Fixes: e1eaea46bb40 ("tty: n_gsm line discipline")
Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
Link: https://lore.kernel.org/r/20220701061652.39604-4-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/n_gsm.c