linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/8] serial: qcom-geni: Overhaul TX handling to fix crashes/hangs
@ 2024-06-10 22:24 Douglas Anderson
  2024-06-10 22:24 ` [PATCH v4 1/8] soc: qcom: geni-se: Add GP_LENGTH/IRQ_EN_SET/IRQ_EN_CLEAR registers Douglas Anderson
                   ` (11 more replies)
  0 siblings, 12 replies; 33+ messages in thread
From: Douglas Anderson @ 2024-06-10 22:24 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Yicong Yang, Tony Lindgren, Andy Shevchenko, Johan Hovold,
	John Ogness, linux-arm-msm, Bjorn Andersson, Konrad Dybcio,
	Ilpo Järvinen, Stephen Boyd, linux-serial, linux-kernel,
	Uwe Kleine-König, Douglas Anderson, Rob Herring,
	Thomas Gleixner, Vijaya Krishna Nivarthi


While trying to reproduce -EBUSY errors that our lab was getting in
suspend/resume testing, I ended up finding a whole pile of problems
with the Qualcomm GENI serial driver. I've posted a fix for the -EBUSY
issue separately [1]. This series is fixing all of the Qualcomm GENI
problems that I found.

As far as I can tell most of the problems have been in the Qualcomm
GENI serial driver since inception, but it can be noted that the
behavior got worse with the new kfifo changes. Previously when the OS
took data out of the circular queue we'd just spit stale data onto the
serial port. Now we'll hard lockup. :-P

I've tried to break this series up as much as possible to make it
easier to understand but the final patch is still a lot of change at
once. Hopefully it's OK.

[1] https://lore.kernel.org/r/20240530084841.v2.1.I2395e66cf70c6e67d774c56943825c289b9c13e4@changeid

Changes in v4:
- Add GP_LENGTH field definition.
- Fix indentation.
- GENMASK(31, 0) -> GP_LENGTH.
- Use uart_fifo_timeout_ms() for timeout.
- tty: serial: Add uart_fifo_timeout_ms()

Changes in v3:
- 0xffffffff => GENMASK(31, 0)
- Reword commit message.
- Use uart_fifo_timeout() for timeout.

Changes in v2:
- Totally rework / rename patch to handle suspend while active xfer
- serial: qcom-geni: Fix arg types for qcom_geni_serial_poll_bit()
- serial: qcom-geni: Fix the timeout in qcom_geni_serial_poll_bit()
- serial: qcom-geni: Introduce qcom_geni_serial_poll_bitfield()
- serial: qcom-geni: Just set the watermark level once
- serial: qcom-geni: Rework TX in FIFO mode to fix hangs/lockups
- soc: qcom: geni-se: Add GP_LENGTH/IRQ_EN_SET/IRQ_EN_CLEAR registers

Douglas Anderson (8):
  soc: qcom: geni-se: Add GP_LENGTH/IRQ_EN_SET/IRQ_EN_CLEAR registers
  tty: serial: Add uart_fifo_timeout_ms()
  serial: qcom-geni: Fix the timeout in qcom_geni_serial_poll_bit()
  serial: qcom-geni: Fix arg types for qcom_geni_serial_poll_bit()
  serial: qcom-geni: Introduce qcom_geni_serial_poll_bitfield()
  serial: qcom-geni: Just set the watermark level once
  serial: qcom-geni: Fix suspend while active UART xfer
  serial: qcom-geni: Rework TX in FIFO mode to fix hangs/lockups

 drivers/tty/serial/qcom_geni_serial.c | 322 +++++++++++++++-----------
 include/linux/serial_core.h           |  15 +-
 include/linux/soc/qcom/geni-se.h      |   9 +
 3 files changed, 206 insertions(+), 140 deletions(-)

-- 
2.45.2.505.gda0bf45e8d-goog


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

end of thread, other threads:[~2024-06-26  8:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-10 22:24 [PATCH v4 0/8] serial: qcom-geni: Overhaul TX handling to fix crashes/hangs Douglas Anderson
2024-06-10 22:24 ` [PATCH v4 1/8] soc: qcom: geni-se: Add GP_LENGTH/IRQ_EN_SET/IRQ_EN_CLEAR registers Douglas Anderson
2024-06-10 22:24 ` [PATCH v4 2/8] tty: serial: Add uart_fifo_timeout_ms() Douglas Anderson
2024-06-12  7:38   ` Ilpo Järvinen
2024-06-12 18:45     ` Doug Anderson
2024-06-13  6:56       ` Ilpo Järvinen
2024-06-13 14:02         ` Doug Anderson
2024-06-10 22:24 ` [PATCH v4 3/8] serial: qcom-geni: Fix the timeout in qcom_geni_serial_poll_bit() Douglas Anderson
2024-06-17 18:46   ` Konrad Dybcio
2024-06-10 22:24 ` [PATCH v4 4/8] serial: qcom-geni: Fix arg types for qcom_geni_serial_poll_bit() Douglas Anderson
2024-06-17 18:47   ` Konrad Dybcio
2024-06-10 22:24 ` [PATCH v4 5/8] serial: qcom-geni: Introduce qcom_geni_serial_poll_bitfield() Douglas Anderson
2024-06-17 18:53   ` Konrad Dybcio
2024-06-10 22:24 ` [PATCH v4 6/8] serial: qcom-geni: Just set the watermark level once Douglas Anderson
2024-06-10 22:24 ` [PATCH v4 7/8] serial: qcom-geni: Fix suspend while active UART xfer Douglas Anderson
2024-06-17 19:02   ` Konrad Dybcio
2024-06-24 12:12   ` Johan Hovold
2024-06-24 16:54     ` Johan Hovold
2024-06-24 20:58     ` Doug Anderson
2024-06-25  8:46       ` Johan Hovold
2024-06-10 22:24 ` [PATCH v4 8/8] serial: qcom-geni: Rework TX in FIFO mode to fix hangs/lockups Douglas Anderson
2024-06-17 19:10   ` Konrad Dybcio
2024-06-17 19:37     ` Doug Anderson
2024-06-17 19:54       ` Konrad Dybcio
2024-06-24 12:43   ` Johan Hovold
2024-06-24 21:15     ` Doug Anderson
2024-06-25 11:21       ` Johan Hovold
2024-06-25 14:29         ` Doug Anderson
2024-06-26  8:20           ` Johan Hovold
2024-06-18 10:19 ` [PATCH v4 0/8] serial: qcom-geni: Overhaul TX handling to fix crashes/hangs Konrad Dybcio
2024-06-19  8:25 ` neil.armstrong
2024-06-19  8:50 ` Johan Hovold
2024-06-20 23:13 ` Nícolas F. R. A. Prado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).