public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/16] i3c: mipi-i3c-hci: DMA abort, recovery and related improvements
@ 2026-04-16 17:56 Adrian Hunter
  2026-04-16 17:56 ` [PATCH 01/16] i3c: mipi-i3c-hci: Fix suspend behavior when bus disable falls back to software reset Adrian Hunter
                   ` (15 more replies)
  0 siblings, 16 replies; 25+ messages in thread
From: Adrian Hunter @ 2026-04-16 17:56 UTC (permalink / raw)
  To: alexandre.belloni; +Cc: Frank.Li, linux-i3c, linux-kernel

Hi

This series improves the robustness of the MIPI I3C HCI DMA mode driver,
addressing issues observed during error handling and recovery.

Patch 1 ensures suspend always invokes io->suspend.

Patches 2-4 fix issues in the existing DMA abort path: preserving the RUN
bit during abort per the MIPI specification, blocking enqueue during
abort/error, and waiting for ring restart completion.

Patches 5-8 improve how partially completed transfer lists are handled
during dequeue: moving hci_dma_xfer_done() earlier so completed
responses are processed before NoOp replacement, completing transfer
lists immediately on error rather than deferring, and detecting when an
abort races with transfer completion to avoid restarting the wrong
transfer list.

Patches 9-10 add Intel-specific quirks for DMA ring abort: a PIO queue
reset after abort, and an HC_CONTROL ABORT before the ring-level abort.

Patch 11 factors out a reset-and-restore helper from the suspend path
for reuse.

Patch 12 adds a full DMA recovery path for internal controller errors.
When the hardware reports a TID mismatch or the ring becomes stuck, the
driver now resets and restores the controller, terminating all in-flight
transfers with an error status.

Patch 13 makes NoOp command handling observable: instead of discarding
NoOp responses, the driver now waits for them to complete and triggers
recovery if they fail.

Patch 14 adjusts transfer timeout accounting to start from when a
transfer actually begins execution rather than when it was queued,
preventing premature timeouts behind slow predecessors.

Patches 15-16 are minor optimizations: consolidating the DMA command and
response ring into a single coherent allocation, and increasing the ring
size to the maximum 255 entries to avoid ring-space exhaustion.

Adrian Hunter (16):
  i3c: mipi-i3c-hci: Fix suspend behavior when bus disable falls back to software reset
  i3c: mipi-i3c-hci: Preserve RUN bit when aborting DMA ring
  i3c: mipi-i3c-hci: Prevent DMA enqueue while ring is aborting or in error
  i3c: mipi-i3c-hci: Wait for DMA ring restart to complete
  i3c: mipi-i3c-hci: Move hci_dma_xfer_done() definition
  i3c: mipi-i3c-hci: Call hci_dma_xfer_done() from dequeue path
  i3c: mipi-i3c-hci: Complete transfer lists immediately on error
  i3c: mipi-i3c-hci: Avoid restarting DMA ring after aborting wrong transfer
  i3c: mipi-i3c-hci: Add DMA ring abort/reset quirk for Intel controllers
  i3c: mipi-i3c-hci: Add DMA ring abort quirk for Intel controllers
  i3c: mipi-i3c-hci: Factor out reset-and-restore helper
  i3c: mipi-i3c-hci: Add DMA-mode recovery for internal controller errors
  i3c: mipi-i3c-hci: Wait for NoOp commands to complete
  i3c: mipi-i3c-hci: Base timeouts on actual transfer start time
  i3c: mipi-i3c-hci: Consolidate DMA ring allocation
  i3c: mipi-i3c-hci: Increase DMA transfer ring size to maximum

 drivers/i3c/master/mipi-i3c-hci/cmd.h  |   6 +
 drivers/i3c/master/mipi-i3c-hci/core.c |  83 +++++++--
 drivers/i3c/master/mipi-i3c-hci/dma.c  | 332 +++++++++++++++++++++++++--------
 drivers/i3c/master/mipi-i3c-hci/hci.h  |  22 +++
 drivers/i3c/master/mipi-i3c-hci/pio.c  |   3 +
 5 files changed, 358 insertions(+), 88 deletions(-)


Regards
Adrian

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

end of thread, other threads:[~2026-04-17 17:12 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 17:56 [PATCH 00/16] i3c: mipi-i3c-hci: DMA abort, recovery and related improvements Adrian Hunter
2026-04-16 17:56 ` [PATCH 01/16] i3c: mipi-i3c-hci: Fix suspend behavior when bus disable falls back to software reset Adrian Hunter
2026-04-17  6:37   ` Frank Li
2026-04-16 17:56 ` [PATCH 02/16] i3c: mipi-i3c-hci: Preserve RUN bit when aborting DMA ring Adrian Hunter
2026-04-17  6:47   ` Frank Li
2026-04-16 17:56 ` [PATCH 03/16] i3c: mipi-i3c-hci: Prevent DMA enqueue while ring is aborting or in error Adrian Hunter
2026-04-17  6:56   ` Frank Li
2026-04-17 17:07     ` Adrian Hunter
2026-04-16 17:56 ` [PATCH 04/16] i3c: mipi-i3c-hci: Wait for DMA ring restart to complete Adrian Hunter
2026-04-16 17:56 ` [PATCH 05/16] i3c: mipi-i3c-hci: Move hci_dma_xfer_done() definition Adrian Hunter
2026-04-17  7:01   ` Frank Li
2026-04-16 17:56 ` [PATCH 06/16] i3c: mipi-i3c-hci: Call hci_dma_xfer_done() from dequeue path Adrian Hunter
2026-04-17  7:04   ` Frank Li
2026-04-16 17:56 ` [PATCH 07/16] i3c: mipi-i3c-hci: Complete transfer lists immediately on error Adrian Hunter
2026-04-17  8:11   ` Frank Li
2026-04-17 17:12     ` Adrian Hunter
2026-04-16 17:56 ` [PATCH 08/16] i3c: mipi-i3c-hci: Avoid restarting DMA ring after aborting wrong transfer Adrian Hunter
2026-04-16 17:56 ` [PATCH 09/16] i3c: mipi-i3c-hci: Add DMA ring abort/reset quirk for Intel controllers Adrian Hunter
2026-04-16 17:56 ` [PATCH 10/16] i3c: mipi-i3c-hci: Add DMA ring abort " Adrian Hunter
2026-04-16 17:56 ` [PATCH 11/16] i3c: mipi-i3c-hci: Factor out reset-and-restore helper Adrian Hunter
2026-04-16 17:57 ` [PATCH 12/16] i3c: mipi-i3c-hci: Add DMA-mode recovery for internal controller errors Adrian Hunter
2026-04-16 17:57 ` [PATCH 13/16] i3c: mipi-i3c-hci: Wait for NoOp commands to complete Adrian Hunter
2026-04-16 17:57 ` [PATCH 14/16] i3c: mipi-i3c-hci: Base timeouts on actual transfer start time Adrian Hunter
2026-04-16 17:57 ` [PATCH 15/16] i3c: mipi-i3c-hci: Consolidate DMA ring allocation Adrian Hunter
2026-04-16 17:57 ` [PATCH 16/16] i3c: mipi-i3c-hci: Increase DMA transfer ring size to maximum Adrian Hunter

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