[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PULL 45/55] ide: only constrain read/write requests to dr
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-stable] [PULL 45/55] ide: only constrain read/write requests to drive size, not other types |
Date: |
Fri, 15 Aug 2014 18:06:52 +0100 |
From: Michael Tokarev <address@hidden>
Commit 58ac321135a introduced a check to ide dma processing which
constrains all requests to drive size. However, apparently, some
valid requests (like TRIM) does not fit in this constraint, and
fails in 2.1. So check the range only for reads and writes.
Cc: address@hidden
Signed-off-by: Michael Tokarev <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/ide/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 82dd4af..b48127f 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;
--
1.9.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-stable] [PULL 45/55] ide: only constrain read/write requests to drive size, not other types,
Stefan Hajnoczi <=