Skip to content

Commit f415a63

Browse files
joevtdingusdev
authored andcommitted
dbdma: Allow Stop command to set xferStatus.
Some software may check the status flags of a Stop DBDMA descriptor.
1 parent 50e661f commit f415a63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

devices/common/dbdma.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ uint8_t DMAChannel::interpret_cmd() {
131131
case DBDMA_Cmd::STOP:
132132
this->ch_stat &= ~CH_STAT_ACTIVE;
133133
this->cmd_in_progress = false;
134+
this->finish_cmd();
134135
break;
135136
default:
136137
LOG_F(ERROR, "%s: Unsupported DMA command 0x%X", this->get_name().c_str(),
@@ -202,7 +203,7 @@ void DMAChannel::finish_cmd() {
202203
this->res_count = 0;
203204
}
204205

205-
if (!branch_taken)
206+
if (this->cur_cmd < DBDMA_Cmd::STOP && !branch_taken)
206207
this->cmd_ptr += 16;
207208

208209
this->cmd_in_progress = false;

0 commit comments

Comments
 (0)