Patchwork [2/4] ide: Set bus master inactive on error

login
register
mail settings
Submitter Kevin Wolf
Date Nov. 26, 2010, 4:21 p.m.
Message ID <1290788492-17703-3-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/73199/
State New
Headers show

Comments

Kevin Wolf - Nov. 26, 2010, 4:21 p.m.
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 <kwolf@redhat.com>
---
 hw/ide/core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Stefan Hajnoczi - Nov. 26, 2010, 4:40 p.m.
On Fri, Nov 26, 2010 at 4:21 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> 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 <kwolf@redhat.com>
> ---
>  hw/ide/core.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

Patch

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 7136ade..430350f 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);
 }