linux/drivers/i3c/master
Adrian Hunter 003df94bcc i3c: mipi-i3c-hci: Correct RING_CTRL_ABORT handling in DMA dequeue
commit b795e68bf3 upstream.

The logic used to abort the DMA ring contains several flaws:

 1. The driver unconditionally issues a ring abort even when the ring has
    already stopped.
 2. The completion used to wait for abort completion is never
    re-initialized, resulting in incorrect wait behavior.
 3. The abort sequence unintentionally clears RING_CTRL_ENABLE, which
    resets hardware ring pointers and disrupts the controller state.
 4. If the ring is already stopped, the abort operation should be
    considered successful without attempting further action.

Fix the abort handling by checking whether the ring is running before
issuing an abort, re-initializing the completion when needed, ensuring that
RING_CTRL_ENABLE remains asserted during abort, and treating an already
stopped ring as a successful condition.

Fixes: 9ad9a52cce ("i3c/master: introduce the mipi-i3c-hci driver")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260306072451.11131-9-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-03-19 16:08:48 +01:00
..
mipi-i3c-hci i3c: mipi-i3c-hci: Correct RING_CTRL_ABORT handling in DMA dequeue 2026-03-19 16:08:48 +01:00
adi-i3c-master.c i3c: master: adi: fix number of bytes written to fifo 2025-09-29 00:11:59 +02:00
ast2600-i3c-master.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
dw-i3c-master.c i3c: dw-i3c-master: Set SIR_REJECT in DAT on device attach and reattach 2026-03-19 16:08:31 +01:00
dw-i3c-master.h i3c: dw: Add quirk to address OD/PP timing issue on AMD platform 2024-11-18 14:27:29 +01:00
i3c-master-cdns.c i3c: master: cdns: Simplify handling clocks in probe() 2025-07-31 01:24:25 +02:00
Kconfig i3c: master: Add driver for Analog Devices I3C Controller IP 2025-09-16 17:06:43 +02:00
Makefile i3c: master: Add driver for Analog Devices I3C Controller IP 2025-09-16 17:06:43 +02:00
renesas-i3c.c i3c: renesas: Simplify return statement in 'renesas_i3c_daa' 2025-09-16 17:06:43 +02:00
svc-i3c-master.c i3c: master: svc: Initialize 'dev' to NULL in svc_i3c_master_ibi_isr() 2026-03-04 07:19:30 -05:00