]> xenbits.xensource.com Git - seabios.git/commit
esp-scsi: flush FIFO before sending SCSI command
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 7 Aug 2023 06:52:58 +0000 (07:52 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 24 Aug 2023 08:40:09 +0000 (10:40 +0200)
commitdb50227d4e42057f8ff520777b36ab7a742a4bfc
tree21ada671997d49a13d9527d53cd4cbe0753c3d39
parent774a823a966cdc5d31ddc11af2b7b4f2c250ffdd
esp-scsi: flush FIFO before sending SCSI command

The ESP FIFO is used as a buffer for DMA requests and so isn't guaranteed to
be empty in the case of SCSI errors or a mixed DMA/non-DMA request. Flush the
FIFO before sending a SCSI command to guarantee that it is correctly
positioned at the start of the FIFO.

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: <20230807065300.366070-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/hw/esp-scsi.c