diff mbox

[3/6] ide: Support I/O status

Message ID 1314902275-5240-4-git-send-email-lcapitulino@redhat.com
State New
Headers show

Commit Message

Luiz Capitulino Sept. 1, 2011, 6:37 p.m. UTC
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 hw/ide/core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 41f2679..16b422f 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -527,6 +527,7 @@  static int ide_handle_rw_error(IDEState *s, int error, int op)
         s->bus->error_status = op;
         bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
         vm_stop(RSTATE_IO_ERROR);
+        bdrv_iostatus_update(s->bs, error);
     } else {
         if (op & BM_STATUS_DMA_RETRY) {
             dma_buf_commit(s, 0);
@@ -1801,6 +1802,7 @@  int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind,
     }
 
     ide_reset(s);
+    bdrv_iostatus_enable(bs);
     bdrv_set_removable(bs, s->drive_kind == IDE_CD);
     return 0;
 }