]> xenbits.xensource.com Git - seabios.git/commit
esp-scsi: handle non-DMA SCSI commands with no data phase
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 7 Aug 2023 06:53:00 +0000 (07:53 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 24 Aug 2023 08:40:09 +0000 (10:40 +0200)
commit7a4003be25eae462f3c3d8aad96b57e34dc0c2b8
tree7a1583095fb5d04c3b7159b887f4af9c3391fe8b
parentcf4b829f0c09153c504858d2f8426912907124d8
esp-scsi: handle non-DMA SCSI commands with no data phase

The existing esp-scsi state machine checks for the STAT_TC bit to exit state 1
but in the case where there is no data phase, a non-DMA command is executed
which doesn't set STAT_TC. This only works because QEMU currently always sets
STAT_TC just after issuing every SCSI command.

Update the esp-scsi state machine so that in the case where there is no data
phase, we immediately execute CMD_ICCS instead of waiting for STAT_TC to be
set which will never happen with a non-DMA CMD_SELATN command.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-ID: <20230807065300.366070-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
src/hw/esp-scsi.c