Skip to content

Commit 66d0703

Browse files
committed
[dma] Handle dma state properly
1 parent fd7ec12 commit 66d0703

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/DmaChannelPdaBase.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,14 @@ void DmaChannelPdaBase::startDma()
140140
// Checks DMA state and forwards call to subclass if necessary
141141
void DmaChannelPdaBase::stopDma()
142142
{
143-
mDmaState = DmaState::STOPPED;
144143
if (mDmaState == DmaState::UNKNOWN) {
145144
log("Unknown DMA state");
145+
mDmaState = DmaState::STOPPED;
146146
} else if (mDmaState == DmaState::STOPPED) {
147147
log("Warning: DMA already stopped. Ignoring stopDma() call");
148148
} else {
149149
log("Stopping DMA", InfoLogger::InfoLogger::Debug);
150+
mDmaState = DmaState::STOPPED;
150151
deviceStopDma();
151152
}
152153
}

0 commit comments

Comments
 (0)