From bc582e64cce0781eb2c9d28e6c1db40bf56ff07f Mon Sep 17 00:00:00 2001 From: joevt Date: Mon, 30 Oct 2023 19:06:03 -0700 Subject: [PATCH] dbdma: Clear cmd_in_progress before callback. Because the callback might start DMA commands. --- devices/common/dbdma.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/common/dbdma.cpp b/devices/common/dbdma.cpp index 2e8e424..3f2f4e7 100644 --- a/devices/common/dbdma.cpp +++ b/devices/common/dbdma.cpp @@ -467,11 +467,11 @@ void DMAChannel::start() { this->queue_len = 0; + this->cmd_in_progress = false; + if (this->start_cb) this->start_cb(); - this->cmd_in_progress = false; - // some DBDMA programs contain commands that don't transfer data // between a device and memory (LOAD_QUAD, STORE_QUAD, NOP and STOP). // We thus interprete the DBDMA program until a data transfer between