[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/24] ide: do not use BMDMA in restart callback
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 17/24] ide: do not use BMDMA in restart callback |
Date: |
Mon, 28 Oct 2013 17:43:33 +0100 |
Whenever an error stops the VM, ide_handle_rw_error does
"s->bus->dma->unit = s->unit". So we can just use
idebus_active_if.
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/ide/pci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 4a1328d..4df50dc 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -208,17 +208,17 @@ static void bmdma_restart_bh(void *opaque)
qemu_bh_delete(bm->bh);
bm->bh = NULL;
- if (bm->unit == (uint8_t) -1) {
+ error_status = bus->error_status;
+ if (bus->error_status == 0) {
return;
}
- s = bmdma_active_if(bm);
+ s = idebus_active_if(bus);
is_read = (bus->error_status & IDE_RETRY_READ) != 0;
/* The error status must be cleared before resubmitting the request: The
* request may fail again, and this case can only be distinguished if the
* called function can set a new error status. */
- error_status = bus->error_status;
bus->error_status = 0;
if (error_status & IDE_RETRY_DMA) {
--
1.8.3.1
- [Qemu-devel] [PATCH 11/24] ide: fold add_status callback into set_inactive, (continued)
- [Qemu-devel] [PATCH 11/24] ide: fold add_status callback into set_inactive, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 12/24] ide: move BM_STATUS bits to pci.[ch], Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 13/24] ide: move retry constants out of BM_STATUS_* namespace, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 14/24] ide: start extracting ide_restart_dma out of bmdma_restart_dma, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 15/24] ide: prepare to move restart to common code, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 16/24] ide: introduce ide_register_restart_cb, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 17/24] ide: do not use BMDMA in restart callback,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 18/24] ide: pass IDEBus to the restart_cb, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 19/24] ide: move restart callback to common code, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 20/24] ide: remove restart_cb callback, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 21/24] ide: replace set_unit callback with more IDEBus state, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 22/24] ide: place initial state of the current request to IDEBus, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 23/24] ide: migrate initial request state via IDEBus, Paolo Bonzini, 2013/10/28
- [Qemu-devel] [PATCH 24/24] ide: commonize io_buffer_index initialization, Paolo Bonzini, 2013/10/28
- Re: [Qemu-devel] [WIP PATCH 00/24] IDE cleanups, initial work on AHCI rerror/werror=stop, Michael S. Tsirkin, 2013/10/28