]> git.proxmox.com Git - mirror_qemu.git/commit
esp: handle non-DMA transfers from the target one byte at a time
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 19 May 2021 10:08:00 +0000 (11:08 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Jun 2021 15:17:09 +0000 (17:17 +0200)
commit6ef2cabc7c4231207cfbac326853c0242d9c4617
tree41590a3d9e1685e8b0db47b84afbe763d61b7193
parent880d3089f1c667d7c84730ba9e9a2518220f7caf
esp: handle non-DMA transfers from the target one byte at a time

The initial implementation of non-DMA transfers was based upon analysis of traces
from the MacOS toolbox ROM for handling unaligned reads but missed one key
aspect - during a non-DMA transfer from the target, the bus service interrupt
should be raised for every single byte received from the bus and not just at either
the end of the transfer or when the FIFO is full.

Adjust the non-DMA code accordingly so that esp_do_nodma() is called for every byte
received from the target. This also includes special handling for managing the change
from DATA IN to STATUS phase as this needs to occur when the final byte is read out
from the FIFO, and not at the end of the transfer of the last byte into the FIFO.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20210519100803.10293-3-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/esp.c