Skip to content

Commit aae114b

Browse files
hreineckemdroth
authored andcommitted
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 <[email protected]> Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]> (cherry picked from commit c3543fb) Signed-off-by: Michael Roth <[email protected]>
1 parent cfa86bc commit aae114b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hw/scsi/esp-pci.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ static void esp_pci_dma_memory_rw(PCIESPState *pci, uint8_t *buf, int len,
268268
/* update status registers */
269269
pci->dma_regs[DMA_WBC] -= len;
270270
pci->dma_regs[DMA_WAC] += len;
271+
if (pci->dma_regs[DMA_WBC] == 0)
272+
pci->dma_regs[DMA_STAT] |= DMA_STAT_DONE;
271273
}
272274

273275
static void esp_pci_dma_memory_read(void *opaque, uint8_t *buf, int len)

0 commit comments

Comments
 (0)