Skip to content

Commit

Permalink
esp.c: remove unaligned adjustment in do_dma_pdma_cb() to device path
Browse files Browse the repository at this point in the history
With the latest changes this condition cannot occur anymore and so the logic
can be completely removed.

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-26-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 12486e4 commit 81ed2ed
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions hw/scsi/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,15 +604,6 @@ static void do_dma_pdma_cb(ESPState *s)
s->async_len -= n;
s->ti_size += n;

if (n < len) {
/* Unaligned accesses can cause FIFO wraparound */
len = len - n;
n = esp_fifo_pop_buf(&s->fifo, s->async_buf, len);
s->async_buf += n;
s->async_len -= n;
s->ti_size += n;
}

if (s->async_len == 0) {
scsi_req_continue(s->current_req);
return;
Expand Down

0 comments on commit 81ed2ed

Please sign in to comment.