esp.c: replace esp_fifo_pop_buf() with esp_fifo8_pop_buf() in do_message_phase()
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 24 Mar 2024 19:16:52 +0000 (19:16 +0000)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 4 Apr 2024 14:17:53 +0000 (15:17 +0100)
The aim is to restrict the esp_fifo_*() functions so that they only operate on
the hardware FIFO. When reading from cmdfifo in do_message_phase() use the
underlying esp_fifo8_pop_buf() function directly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20240324191707.623175-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
hw/scsi/esp.c

index ff51145da75461c75b8029df5c2020e2d54d1e38..9386704a580d6d723d0a301077a3ebd2277a533a 100644 (file)
@@ -325,7 +325,7 @@ static void do_message_phase(ESPState *s)
     /* Ignore extended messages for now */
     if (s->cmdfifo_cdb_offset) {
         int len = MIN(s->cmdfifo_cdb_offset, fifo8_num_used(&s->cmdfifo));
-        esp_fifo_pop_buf(&s->cmdfifo, NULL, len);
+        esp_fifo8_pop_buf(&s->cmdfifo, NULL, len);
         s->cmdfifo_cdb_offset = 0;
     }
 }