]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "serial: 8250: Fix reporting real baudrate value in c_ospeed field"
authorJohan Hovold <johan@kernel.org>
Thu, 7 Oct 2021 13:31:46 +0000 (15:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Oct 2021 14:22:29 +0000 (16:22 +0200)
commitce3a6f5e8f19350c43ea001a85565808038af04c
tree06687a0bff6efa9839ba72b4cd2554d3a19e0a61
parent5af36b3851f0ce8303bafb8f8195627f7fdb98d6
Revert "serial: 8250: Fix reporting real baudrate value in c_ospeed field"

This reverts commit 5af36b3851f0ce8303bafb8f8195627f7fdb98d6.

The commit in question claims to determine the inverse of
serial8250_get_divisor() but failed to notice that some drivers override
the default implementation using a get_divisor() callback.

This means that the computed line-speed values can be completely wrong
and results in regular TCSETS requests failing (the incorrect values
would also be passed to any overridden set_divisor() callback).

Similarly, it also failed to honour the old (deprecated) ASYNC_SPD_FLAGS
and would break applications relying on those when re-encoding the
actual line speed.

There are also at least two quirks, UART_BUG_QUOT and an OMAP1510
workaround, which were happily ignored and that are now broken.

Finally, even if the offending commit were to be implemented correctly,
this is a new feature and not something which should be backported to
stable.

Cc: Pali Rohár <pali@kernel.org>
Fixes: 5af36b3851f0 ("serial: 8250: Fix reporting real baudrate value in c_ospeed field")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20211007133146.28949-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c