public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 0/4] Serial: 8250: Fix PSLVERR related issues
@ 2025-06-10  9:21 Yunhui Cui
  2025-06-10  9:21 ` [PATCH v9 1/4] serial: 8250: fix panic due to PSLVERR Yunhui Cui
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Yunhui Cui @ 2025-06-10  9:21 UTC (permalink / raw)
  To: arnd, andriy.shevchenko, benjamin.larsson, cuiyunhui, gregkh,
	heikki.krogerus, ilpo.jarvinen, jirislaby, jkeeping, john.ogness,
	linux-kernel, linux-serial, markus.mayer, matt.porter, namcao,
	paulmck, pmladek, schnelle, sunilvl, tim.kryger

Cause of PSLVERR:
When the PSLVERR_RESP_EN parameter is set to 1, the device generates
an error response if an attempt is made to read an empty RBR
(Receive Buffer Register) while the FIFO is enabled.

Patch[1]: Fixes a panic caused by PSLVERR due to concurrent UART access.
Patch[2]: Fixes a panic caused by PSLVERR during RX_TIMEOUT conditions.
Patch[3] & Patch[4]: Improvements to minimize the occurrence of PSLVERR.

v1 -> v2:
Added UART_LSR_DR check in shutdown() to avoid PSLVERR issues.
Added Fixes: tag to reference upstream issues.
v2 -> v3:
Added lock protection in more functions (e.g., autoconfig_irq()) to
ensure atomicity.
Used lockdep_assert_held_once to detect potential deadlock risks early.
v3 -> v4:
Introduced serial8250_discard_data() to unify data read logic and avoid
code duplication.
Addressed PSLVERR caused by RX_TIMEOUT.
Split complex fixes into multiple patches (1/4 to 4/4).
v4 -> v5:
Removed reads from UART_FCR, using up->fcr to determine FIFO enable status.
Removed return value from serial8250_discard_data().
v5 -> v6:
Based on latest linux-next code: Resolved redundant dont_test_tx_en code.
Updated comments and git commit descriptions.
v6 -> v7:
Reverted PSLVERR-related changes in serial8250_get_poll_char().
v7 -> v8:
Added Cc: stable@vger.kernel.org to patch[1] and patch[4].
v8 -> v9:
Reordered the patches: bugfixes as 1-2, improvements as 3-4.

Yunhui Cui (4):
  serial: 8250: fix panic due to PSLVERR
  serial: 8250_dw: fix PSLVERR on RX_TIMEOUT
  serial: 8250: avoid potential PSLVERR issue
  serial: 8250_dw: assert port->lock is held in dw8250_force_idle()

 drivers/tty/serial/8250/8250.h      | 13 +++++++++++++
 drivers/tty/serial/8250/8250_dw.c   | 14 +++++++++++++-
 drivers/tty/serial/8250/8250_port.c | 29 +++++++++++++++++------------
 3 files changed, 43 insertions(+), 13 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-07-18 15:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10  9:21 [PATCH v9 0/4] Serial: 8250: Fix PSLVERR related issues Yunhui Cui
2025-06-10  9:21 ` [PATCH v9 1/4] serial: 8250: fix panic due to PSLVERR Yunhui Cui
2025-06-20 11:19   ` John Ogness
2025-07-17 12:19     ` [External] " yunhui cui
2025-07-17 12:32       ` Greg KH
2025-06-10  9:21 ` [PATCH v9 2/4] serial: 8250_dw: fix PSLVERR on RX_TIMEOUT Yunhui Cui
2025-06-23  6:50   ` yunhui cui
2025-06-23  8:32     ` John Ogness
2025-07-11  2:19       ` [External] " yunhui cui
2025-07-17 14:14         ` John Ogness
2025-07-18 15:20           ` Doug Anderson
2025-06-10  9:21 ` [PATCH v9 3/4] serial: 8250: avoid potential PSLVERR issue Yunhui Cui
2025-06-20 11:20   ` John Ogness
2025-06-10  9:21 ` [PATCH v9 4/4] serial: 8250_dw: assert port->lock is held in dw8250_force_idle() Yunhui Cui
2025-06-20 12:14   ` John Ogness
2025-06-23  6:44     ` [External] " yunhui cui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox