Skip to contentSkip to conversation

hw/dma: sifive_pdma: Set done bit upon completion

PATCH Applied Jay Chang 2 participants 3 messages Mar 4 SiFive drivers

lore
Share & tools
lore

Jay Chang

author
#0 lore raw

PATCH 1/1 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.

---
 hw/dma/sifive_pdma.c | 1 +
 1 file changed, 1 insertion(+)
hw/dma/sifive_pdma.c +1 -0
index 6d06ec0375..7b22e51492 100644
@@ -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)
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jay Chang

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.

Alistair

Quoted 20 lines
---
 hw/dma/sifive_pdma.c | 1 +
 1 file changed, 1 insertion(+)
hw/dma/sifive_pdma.c +1 -1
index 6d06ec0375..7b22e51492 100644
@@ -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)
--

2.48.1

#2 lore raw
In reply to Jay Chang
Quoted 7 lines · Jay Chang

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.

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 20 lines
---
 hw/dma/sifive_pdma.c | 1 +
 1 file changed, 1 insertion(+)
hw/dma/sifive_pdma.c +1 -1
index 6d06ec0375..7b22e51492 100644
@@ -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)
--

2.48.1