[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/12] ide/core: Remove explicit setting of BM_STATU
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 01/12] ide/core: Remove explicit setting of BM_STATUS_INT |
Date: |
Wed, 8 Jun 2011 15:48:19 +0200 |
BM_STATUS_INT is automatically set during ide_set_irq(), there's no reason to
set it manually in addition.
There is even one case where the interrupt status bit was set, but no IRQ was
raised. This is when the PRD table was reached but there is more data to
transfer. The correct behaviour for this case is not to set BM_STATUS_INT.
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/ide/core.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 45410e8..95beb17 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -430,7 +430,6 @@ void ide_dma_error(IDEState *s)
s->error = ABRT_ERR;
s->status = READY_STAT | ERR_STAT;
ide_set_inactive(s);
- s->bus->dma->ops->add_status(s->bus->dma, BM_STATUS_INT);
ide_set_irq(s->bus);
}
@@ -500,8 +499,11 @@ handle_rw_error:
n = s->nsector;
s->io_buffer_index = 0;
s->io_buffer_size = n * 512;
- if (s->bus->dma->ops->prepare_buf(s->bus->dma, s->is_read) == 0)
+ if (s->bus->dma->ops->prepare_buf(s->bus->dma, s->is_read) == 0) {
+ /* The PRDs were too short. Reset the Active bit, but don't raise an
+ * interrupt. */
goto eot;
+ }
#ifdef DEBUG_AIO
printf("ide_dma_cb: sector_num=%" PRId64 " n=%d, is_read=%d\n",
@@ -523,7 +525,6 @@ handle_rw_error:
return;
eot:
- s->bus->dma->ops->add_status(s->bus->dma, BM_STATUS_INT);
ide_set_inactive(s);
}
--
1.7.5.2
- [Qemu-devel] [PULL 00/12] Block patches, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 03/12] vmdk: fix endianness bugs, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 04/12] block/raw-posix: use a character device if a block device is given, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 08/12] rbd: check return values when scheduling aio, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 02/12] block: clarify the meaning of BDRV_O_NOCACHE, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 06/12] rbd: use the higher level librbd instead of just librados, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 11/12] bdrv_img_create: Fix segfault, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 07/12] rbd: allow configuration of rados from the rbd filename, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 01/12] ide/core: Remove explicit setting of BM_STATUS_INT,
Kevin Wolf <=
- [Qemu-devel] [PATCH 10/12] qcow2: Fix memory leaks in error cases, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 05/12] block/raw-posix: get right partition size, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 09/12] rbd: Add bdrv_truncate implementation, Kevin Wolf, 2011/06/08
- [Qemu-devel] [PATCH 12/12] qemu-img create: Fix displayed default cluster size, Kevin Wolf, 2011/06/08
- Re: [Qemu-devel] [PULL 00/12] Block patches, Anthony Liguori, 2011/06/09