From e3982b3cf6d17fbba6839d5252f5f757a8d585dc Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 26 Nov 2010 16:47:42 +0100 Subject: [PATCH] ide: Set bus master inactive on error BMIDEA in the status register must be cleared on error. This makes FreeBSD respond (more) correctly to I/O errors. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- hw/ide/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ide/core.c b/hw/ide/core.c index 7136adef4f..430350f873 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -486,6 +486,8 @@ void ide_dma_error(IDEState *s) ide_transfer_stop(s); s->error = ABRT_ERR; s->status = READY_STAT | ERR_STAT; + ide_dma_set_inactive(s->bus->bmdma); + s->bus->bmdma->status |= BM_STATUS_INT; ide_set_irq(s->bus); }