Re: [PATCH] serial: 8250_dw: Do not reclock if already at correct rate

From: Andy Shevchenko
Date: Fri Feb 23 2024 - 10:06:43 EST


On Thu, Feb 22, 2024 at 11:26:34AM -0800, Peter Collingbourne wrote:
> When userspace opens the console, we call set_termios() passing a
> termios with the console's configured baud rate. Currently this causes
> dw8250_set_termios() to disable and then re-enable the UART clock at
> the same frequency as it was originally. This can cause corruption
> of any concurrent console output. Fix it by skipping the reclocking
> if we are already at the correct rate.

Makes sense to me from code perspective.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko