summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@bootlin.com>2020-05-12 13:53:22 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-25 15:41:53 +0200
commit44c68ccdc80dab817a8e2cf935be5dbbbbf64c07 (patch)
tree55256592e2c0ed6d6b208324d527af4375a2c2f3 /drivers/tty
parenta2ef4a98cf03c9262cc623dc7a998c7786a4e6b7 (diff)
downloadlinux-stable-44c68ccdc80dab817a8e2cf935be5dbbbbf64c07.tar.gz
linux-stable-44c68ccdc80dab817a8e2cf935be5dbbbbf64c07.tar.bz2
linux-stable-44c68ccdc80dab817a8e2cf935be5dbbbbf64c07.zip
tty: n_gsm: Fix SOF skipping
[ Upstream commit 84d6f81c1fb58b56eba81ff0a36cf31946064b40 ] For at least some modems like the TELIT LE910, skipping SOF makes transfers blocking indefinitely after a short amount of data transferred. Given the small improvement provided by skipping the SOF (just one byte on about 100 bytes), it seems better to completely remove this "feature" than make it optional. Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Link: https://lore.kernel.org/r/20200512115323.1447922-3-gregory.clement@bootlin.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/n_gsm.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index f46bd1af7a10..eabdcfa414aa 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -681,7 +681,6 @@ static void gsm_data_kick(struct gsm_mux *gsm)
{
struct gsm_msg *msg, *nmsg;
int len;
- int skip_sof = 0;
list_for_each_entry_safe(msg, nmsg, &gsm->tx_list, list) {
if (gsm->constipated && msg->addr)
@@ -703,15 +702,10 @@ static void gsm_data_kick(struct gsm_mux *gsm)
print_hex_dump_bytes("gsm_data_kick: ",
DUMP_PREFIX_OFFSET,
gsm->txframe, len);
-
- if (gsm->output(gsm, gsm->txframe + skip_sof,
- len - skip_sof) < 0)
+ if (gsm->output(gsm, gsm->txframe, len) < 0)
break;
/* FIXME: Can eliminate one SOF in many more cases */
gsm->tx_bytes -= msg->len;
- /* For a burst of frames skip the extra SOF within the
- burst */
- skip_sof = 1;
list_del(&msg->list);
kfree(msg);