]> git.baikalelectronics.ru Git - kernel.git/commit
serial: stm32: Clear prev values before setting RTS delays
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 27 Jun 2022 15:07:52 +0000 (18:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 18:59:28 +0000 (20:59 +0200)
commit2a4a2686364d30894746d3af2c6dea22ce395405
tree1647634b12bbcee822ca4ba1e1a14448c91c7f39
parent1e23dd56e5f9db9a6742cea76810fbb5d68e8c93
serial: stm32: Clear prev values before setting RTS delays

commit 5e7f260e5f82d9ca8bc72cece342e23e5b495943 upstream.

The code lacks clearing of previous DEAT/DEDT values. Thus, changing
values on the fly results in garbage delays tending towards the maximum
value as more and more bits are ORed together. (Leaving RS485 mode
would have cleared the old values though).

Fixes: 6924c0f211c5 ("serial: stm32: add support for RS485 hardware control mode")
Cc: stable <stable@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220627150753.34510-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c