Re: [PATCH 02/16] i3c: mipi-i3c-hci: Preserve RUN bit when aborting DMA ring

Frank Li
2026-04-17T06:47:20Z

On Thu, Apr 16, 2026 at 08:56:50PM +0300, Adrian Hunter wrote:
> The MIPI I3C HCI specification does not require the DMA ring RUN bit
> (RUN_STOP) to be cleared when issuing an ABORT.
>
> Adjust the RING_CONTROL handling to set ABORT without clearing RUN_STOP,
> bringing the driver into alignment with the specification.
>
> According to the specification, that allows the DMA ring to continue to
> receive IBIs,

This should be major benefit to keep RUN bit. So better to move to first
paragragph

"The MIPI I3C HCI specification does not require the DMA ring RUN bit
RUN_STOP) to be cleared when issuing an ABORT. Keep it to allows the DMA
ring to continue to receive IBIs."

Frank

> although currently ABORT is only used in an error path so
> the change has very little effect in practice.
>
> Fixes: b795e68bf3073 ("i3c: mipi-i3c-hci: Correct RING_CTRL_ABORT handling in DMA dequeue")
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/i3c/master/mipi-i3c-hci/dma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/mipi-i3c-hci/dma.c b/drivers/i3c/master/mipi-i3c-hci/dma.c
> index e487ef52f6b4..4cd32e3afa7b 100644
> --- a/drivers/i3c/master/mipi-i3c-hci/dma.c
> +++ b/drivers/i3c/master/mipi-i3c-hci/dma.c
> @@ -554,7 +554,7 @@ static bool hci_dma_dequeue_xfer(struct i3c_hci *hci,
> if (ring_status & RING_STATUS_RUNNING) {
> /* stop the ring */
> reinit_completion(&rh->op_done);
> - rh_reg_write(RING_CONTROL, RING_CTRL_ENABLE | RING_CTRL_ABORT);
> + rh_reg_write(RING_CONTROL, rh_reg_read(RING_CONTROL) | RING_CTRL_ABORT);
> wait_for_completion_timeout(&rh->op_done, HZ);
> ring_status = rh_reg_read(RING_STATUS);
> if (ring_status & RING_STATUS_RUNNING) {
> --
> 2.51.0
>