]> git.baikalelectronics.ru Git - kernel.git/commit
serial: mvebu-uart: Fix reporting of effective CSIZE to userspace
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 26 Aug 2018 17:49:32 +0000 (19:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Sep 2018 13:22:15 +0000 (15:22 +0200)
commit1c12344195b267aa04e4b21bb9c5a49ec0b4d4e6
tree26027cba68693f2a4c197ff8c67df69ede339314
parentb952db094f6189476b97fccaee073915d3359a25
serial: mvebu-uart: Fix reporting of effective CSIZE to userspace

Apparently, this driver (or the hardware) does not support character
length settings. It's apparently running in 8-bit mode, but it makes
userspace believe it's in 5-bit mode. That makes tcsetattr with CS8
incorrectly fail, breaking e.g. getty from busybox, thus the login shell
on ttyMVx.

Fix by hard-wiring CS8 into c_cflag.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Fixes: 17c38dd8bc36 ("serial: mvebu-uart: initial support for Armada-3700 serial port")
Cc: stable <stable@vger.kernel.org> # 4.6+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/mvebu-uart.c