From: Soumyajyotii Ssarkar <[email protected]> Set waiting state and return after scsi_req_continue() to prevent re entrancy when DMA transfer completes.
Signed-off-by: Soumyajyotii Ssarkar <[email protected]> Reviewed-by: Helge Deller <[email protected]> Signed-off-by: Helge Deller <[email protected]> --- hw/scsi/ncr53c710.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c index 0b7734a129..e17d1f3fb8 100644 --- a/hw/scsi/ncr53c710.c +++ b/hw/scsi/ncr53c710.c @@ -718,7 +718,9 @@ static void ncr710_do_dma(NCR710State *s, int out) if (s->current->dma_len == 0) { s->current->dma_buf = NULL; s->current->pending = 0; + s->waiting = NCR710_WAIT_DMA; scsi_req_continue(s->current->req); + return; } else { s->current->dma_buf += count; s->waiting = NCR710_WAIT_NONE; -- 2.52.0
