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>
Wed, 10 Oct 2018 06:54:18 +0000 (08:54 +0200)
commitcdb2d37d345d694fcf83291c1a5b5465f743fd73
treeefd7c123c725b6c96cd57cc2f14951b5406a2988
parenta17e2a72e714ca20c31e41827ab6088df896c190
serial: mvebu-uart: Fix reporting of effective CSIZE to userspace

commit e0bf2d4982fe7d9ddaf550dd023803ea286f47fc upstream.

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: 30530791a7a0 ("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