]> git.proxmox.com Git - qemu.git/commitdiff
ide: Fix status register after short PRDs
authorKevin Wolf <kwolf@redhat.com>
Tue, 20 Nov 2012 16:27:44 +0000 (17:27 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 21 Nov 2012 08:47:34 +0000 (09:47 +0100)
When failing a request because the length of the regions described by
the PRDT was too short for the requested number of sectors, the IDE
emulation forgot to update the status register, so that the device would
keep the BSY flag set indefinitely.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/ide/core.c

index c2ab78753a18359c07ec4a9b80399254ce716c30..8da894f24018a241bad9770ce26e6c8b6deb8b9d 100644 (file)
@@ -625,6 +625,7 @@ void ide_dma_cb(void *opaque, int ret)
     if (s->bus->dma->ops->prepare_buf(s->bus->dma, ide_cmd_is_read(s)) == 0) {
         /* The PRDs were too short. Reset the Active bit, but don't raise an
          * interrupt. */
+        s->status = READY_STAT | SEEK_STAT;
         goto eot;
     }