diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-05-19 16:42:24 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-06-08 10:39:32 +0200 |
commit | 69c38b8fcec823da05f98f6ea98ec2b0013d64e2 (patch) | |
tree | 4eb91214502a2a73d1573f491ece1414d872d2d5 /hw/ide | |
parent | a90d4690074526f54ad0851fce19fa6783f06803 (diff) | |
download | qemu-69c38b8fcec823da05f98f6ea98ec2b0013d64e2.tar.gz qemu-69c38b8fcec823da05f98f6ea98ec2b0013d64e2.tar.bz2 qemu-69c38b8fcec823da05f98f6ea98ec2b0013d64e2.zip |
ide/core: Remove explicit setting of BM_STATUS_INT
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 <kwolf@redhat.com>
Diffstat (limited to 'hw/ide')
-rw-r--r-- | 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 45410e81a2..95beb175b3 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); } |