summaryrefslogtreecommitdiffstats
path: root/hw/ide/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 82dd4afd84..b48127f921 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -692,7 +692,8 @@ void ide_dma_cb(void *opaque, int ret)
sector_num, n, s->dma_cmd);
#endif
- if (!ide_sect_range_ok(s, sector_num, n)) {
+ if ((s->dma_cmd == IDE_DMA_READ || s->dma_cmd == IDE_DMA_WRITE) &&
+ !ide_sect_range_ok(s, sector_num, n)) {
dma_buf_commit(s);
ide_dma_error(s);
return;