Commit 9251858a65 for qemu.org

commit 9251858a6557b1eb791419d4882b5821ee656bcd
Author: Jay Chang <jay.chang@sifive.com>
Date:   Wed Mar 4 11:08:16 2026 +0800

    hw/dma: sifive_pdma: Set done bit upon completion

    Ensure that the 'done' bit is set upon transfer completion, even if
    an error occurs, since all transfers are considered completed regardless
    of success or failure.

    Signed-off-by: Jay Chang <jay.chang@sifive.com>
    Reviewed-by: Frank Chang <frank.chang@sifive.com>
    Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
    Message-ID: <20260304030816.33209-1-jay.chang@sifive.com>
    Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

diff --git a/hw/dma/sifive_pdma.c b/hw/dma/sifive_pdma.c
index 6d06ec0375..7b22e51492 100644
--- a/hw/dma/sifive_pdma.c
+++ b/hw/dma/sifive_pdma.c
@@ -153,6 +153,7 @@ done:
 error:
     s->chan[ch].state = DMA_CHAN_STATE_ERROR;
     s->chan[ch].control |= CONTROL_ERR;
+    s->chan[ch].control |= CONTROL_DONE;
 }

 static inline void sifive_pdma_update_irq(SiFivePDMAState *s, int ch)