]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
serial: mvebu-uart: correctly report configured baudrate value
authorPali Rohár <pali@kernel.org>
Tue, 28 Jun 2022 10:09:22 +0000 (12:09 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:53:06 +0000 (10:53 +0200)
commit2b85ba2918f59df419e45de4beaff962669a5193
tree13ef39116a2e4f92c7d93bc2b0f11c19d6ecdf03
parent1c424ab23bb0ecb2dd7444f328e69e7f0ea7aed5
serial: mvebu-uart: correctly report configured baudrate value

BugLink: https://bugs.launchpad.net/bugs/1988479
commit 4f532c1e25319e42996ec18a1f473fd50c8e575d upstream.

Functions tty_termios_encode_baud_rate() and uart_update_timeout() should
be called with the baudrate value which was set to hardware. Linux then
report exact values via ioctl(TCGETS2) to userspace.

Change mvebu_uart_baud_rate_set() function to return baudrate value which
was set to hardware and propagate this value to above mentioned functions.

With this change userspace would see precise value in termios c_ospeed
field.

Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate")
Cc: stable <stable@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20220628100922.10717-1-pali@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/tty/serial/mvebu-uart.c