]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
i3c: mipi-i3c-hci: Restart DMA ring correctly after dequeue abort
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 6 Mar 2026 07:24:47 +0000 (09:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Mar 2026 15:15:31 +0000 (16:15 +0100)
commit b6d586431ae20d5157ee468d0ef62ad26798ef13 upstream.

The DMA dequeue path attempts to restart the ring after aborting an
in-flight transfer, but the current sequence is incomplete. The controller
must be brought out of the aborted state and the ring control registers
must be programmed in the correct order: first clearing ABORT, then
re-enabling the ring and asserting RUN_STOP to resume operation.

Add the missing controller resume step and update the ring control writes
so that the ring is restarted using the proper sequence.

Fixes: 9ad9a52cce282 ("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-11-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i3c/master/mipi-i3c-hci/dma.c

index 9a1cc531ac98ab7eab826e702a2084d221792e6c..5c306dc5b564f1f0c8e443c55be9110e62b2d8e0 100644 (file)
@@ -528,7 +528,9 @@ static bool hci_dma_dequeue_xfer(struct i3c_hci *hci,
        }
 
        /* restart the ring */
+       mipi_i3c_hci_resume(hci);
        rh_reg_write(RING_CONTROL, RING_CTRL_ENABLE);
+       rh_reg_write(RING_CONTROL, RING_CTRL_ENABLE | RING_CTRL_RUN_STOP);
 
        return did_unqueue;
 }