Skip to content

Commit

Permalink
ide: Fix status register after short PRDs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kevmw authored and stefanhaRH committed Nov 21, 2012
1 parent 038268e commit 72bcca7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hw/ide/core.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 72bcca7

Please sign in to comment.