diff options
author | Hannes Reinecke <hare@suse.de> | 2014-11-07 13:22:32 +0100 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2015-01-07 14:27:24 -0600 |
commit | aae114b7edd25c2c15bd126ffc6dbe4696f74f7f (patch) | |
tree | deeba8e8316908f9c4e218652ed2256955cd2aaf | |
parent | cfa86bcb7de0342b2d8c5ac590c4b36bcece263c (diff) |
esp-pci: fixup deadlock with linux
A linux guest will be issuing messages:
[ 32.124042] DC390: Deadlock in DataIn_0: DMA aborted unfinished: 000000 bytes remain!!
[ 32.126348] DC390: DataIn_0: DMA State: 0
and the HBA will fail to work properly.
Reason is the emulation is not setting the 'DMA transfer done'
status correctly.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit c3543fb5fe4520f03dd4fef04fab7745eeca1c96)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | hw/scsi/esp-pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c index 9971bbf92d..32849bdb4a 100644 --- a/hw/scsi/esp-pci.c +++ b/hw/scsi/esp-pci.c @@ -268,6 +268,8 @@ static void esp_pci_dma_memory_rw(PCIESPState *pci, uint8_t *buf, int len, /* update status registers */ pci->dma_regs[DMA_WBC] -= len; pci->dma_regs[DMA_WAC] += len; + if (pci->dma_regs[DMA_WBC] == 0) + pci->dma_regs[DMA_STAT] |= DMA_STAT_DONE; } static void esp_pci_dma_memory_read(void *opaque, uint8_t *buf, int len) |