]> git.ipfire.org Git - thirdparty/linux.git/commit
serial: 8250_dw: Avoid unnecessary LCR writes
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 3 Feb 2026 17:10:44 +0000 (19:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2026 14:34:12 +0000 (15:34 +0100)
commit8002d6d6d0d8a36a7d6ca523b17a51cb0fa7c3c3
treeb19694991f7bc94c6f728b1a28806e4386712635
parent59a33d83bbe6d73d2071d7ae21590b29faed0503
serial: 8250_dw: Avoid unnecessary LCR writes

When DW UART is configured with BUSY flag, LCR writes may not always
succeed which can make any LCR write complex and very expensive.
Performing write directly can trigger IRQ and the driver has to perform
complex and distruptive sequence while retrying the write.

Therefore, it's better to avoid doing LCR write that would not change
the value of the LCR register. Add LCR write avoidance code into the
8250_dw driver's .serial_out() functions.

Reported-by: Bandal, Shankar <shankar.bandal@intel.com>
Tested-by: Bandal, Shankar <shankar.bandal@intel.com>
Tested-by: Murthy, Shanth <shanth.murthy@intel.com>
Cc: stable <stable@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/20260203171049.4353-3-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dw.c