Skip to content

Commit

Permalink
esp.c: remove TC adjustment in esp_do_dma() from device path
Browse files Browse the repository at this point in the history
Now that the TC is updated for each PDMA access (rather than once the FIFO is
full) there is no need to adjust the TC at start of each DMA transfer if the
FIFO is not empty.

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-25-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 fabcba4 commit 12486e4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions hw/scsi/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,11 +754,6 @@ static void esp_do_dma(ESPState *s)
esp_lower_drq(s);
}
} else {
/* Adjust TC for any leftover data in the FIFO */
if (!fifo8_is_empty(&s->fifo)) {
esp_set_tc(s, esp_get_tc(s) - fifo8_num_used(&s->fifo));
}

/* Copy device data to FIFO */
len = MIN(len, fifo8_num_free(&s->fifo));
fifo8_push_all(&s->fifo, s->async_buf, len);
Expand Down

0 comments on commit 12486e4

Please sign in to comment.