Skip to content

Commit

Permalink
esp.c: update condition for esp_dma_done() in esp_do_dma() to device …
Browse files Browse the repository at this point in the history
…path

Ensure that esp_dma_done() is only called when TC is zero, which is currently
always the case for DMA transfers.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Helge Deller <deller@gmx.de>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20240112125420.514425-22-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  • Loading branch information
mcayland committed Feb 13, 2024
1 parent 6b7b003 commit c5bd505
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hw/scsi/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,11 @@ static void esp_do_dma(ESPState *s)
return;
}

/* Partially filled a scsi buffer. Complete immediately. */
esp_dma_done(s);
esp_lower_drq(s);
if (esp_get_tc(s) == 0) {
/* Partially filled a scsi buffer. Complete immediately. */
esp_dma_done(s);
esp_lower_drq(s);
}
} else {
esp_set_pdma_cb(s, DO_DMA_PDMA_CB);
esp_raise_drq(s);
Expand Down

0 comments on commit c5bd505

Please sign in to comment.