summaryrefslogtreecommitdiff
path: root/hw/ide/atapi.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-08-04 17:11:17 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2014-08-15 18:03:12 +0100
commitc7e73adb48abb9fc5cbfc4f1ce6090fbdb0bdbea (patch)
tree305929b25a2afa98d2322d43cff0a7a1aef816d0 /hw/ide/atapi.c
parent08ee9e3368be0e9394037d339fc4ebf1392a9896 (diff)
downloadqemu-c7e73adb48abb9fc5cbfc4f1ce6090fbdb0bdbea.tar.gz
qemu-c7e73adb48abb9fc5cbfc4f1ce6090fbdb0bdbea.tar.bz2
qemu-c7e73adb48abb9fc5cbfc4f1ce6090fbdb0bdbea.zip
ide: make all commands go through cmd_done
AHCI has code to fill in the D2H FIS trigger the IRQ all over the place. Centralize this in a single cmd_done callback by generalizing the existing async_cmd_done callback. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/ide/atapi.c')
-rw-r--r--hw/ide/atapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 3b419b3d05..3d92b52dbc 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -174,9 +174,9 @@ void ide_atapi_cmd_reply_end(IDEState *s)
#endif
if (s->packet_transfer_size <= 0) {
/* end of transfer */
- ide_transfer_stop(s);
s->status = READY_STAT | SEEK_STAT;
s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD;
+ ide_transfer_stop(s);
ide_set_irq(s->bus);
#ifdef DEBUG_IDE_ATAPI
printf("status=0x%x\n", s->status);