Skip to content

Commit

Permalink
ide: clear dma->aiocb immediately in ide_dma_cb
Browse files Browse the repository at this point in the history
  • Loading branch information
jnsnow committed Apr 13, 2017
1 parent 99ac1f6 commit 57bf2cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/ide/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,12 +837,13 @@ static void ide_dma_cb(void *opaque, int ret)
uint64_t offset;
bool stay_active = false;

s->bus->dma->aiocb = NULL;

if (ret == -ECANCELED) {
return;
}
if (ret < 0) {
if (ide_handle_rw_error(s, -ret, ide_dma_cmd_to_retry(s->dma_cmd))) {
s->bus->dma->aiocb = NULL;
dma_buf_commit(s, 0);
return;
}
Expand Down

0 comments on commit 57bf2cc

Please sign in to comment.