Skip to content

Commit

Permalink
esp.c: convert do_dma_pdma_cb() do_cmd path to check for SCSI phase i…
Browse files Browse the repository at this point in the history
…nstead

Currently do_cmd is used to determine whether MESSAGE OUT and COMMAND phase data
is being accumulated in cmdfifo. Update esp_do_dma() to check directly for these
two SCSI phases instead.

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-43-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 ad2725a commit e8c84b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hw/scsi/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,9 @@ static void do_dma_pdma_cb(ESPState *s)
int len;
uint32_t n;

if (s->do_cmd) {
switch (esp_get_phase(s)) {
case STAT_MO:
case STAT_CD:
/* Copy FIFO into cmdfifo */
n = esp_fifo_pop_buf(&s->fifo, buf, fifo8_num_used(&s->fifo));
n = MIN(fifo8_num_free(&s->cmdfifo), n);
Expand Down Expand Up @@ -578,10 +580,8 @@ static void do_dma_pdma_cb(ESPState *s)
s->rregs[ESP_RINTR] |= INTR_BS;
esp_raise_irq(s);
}
return;
}
break;

switch (esp_get_phase(s)) {
case STAT_DO:
if (!s->current_req) {
return;
Expand Down

0 comments on commit e8c84b1

Please sign in to comment.