summaryrefslogtreecommitdiffstats
path: root/include/hw
diff options
context:
space:
mode:
authorMark Cave-Ayland2021-03-04 23:10:54 +0100
committerMark Cave-Ayland2021-03-07 11:39:05 +0100
commit4e78f3bf357e0ef2f67e372097f2be8fe0521814 (patch)
tree6da0b82ffb14348e67f566bc6d8fc993789e7142 /include/hw
parentesp: latch individual bits in ESP_RINTR register (diff)
downloadqemu-4e78f3bf357e0ef2f67e372097f2be8fe0521814.tar.gz
qemu-4e78f3bf357e0ef2f67e372097f2be8fe0521814.tar.xz
qemu-4e78f3bf357e0ef2f67e372097f2be8fe0521814.zip
esp: defer command completion interrupt on incoming data transfers
The MacOS toolbox ROM issues a command to the ESP controller as part of its "FAST" SCSI routines and then proceeds to read the incoming data soon after receiving the command completion interrupt. Unfortunately due to SCSI block transfers being asynchronous the incoming data may not yet be present causing an underflow error. Resolve this by waiting for the SCSI subsystem transfer_data callback before raising the command completion interrupt. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20210304221103.6369-34-mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/scsi/esp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h
index 91f8ffd6c8..61bc317a4c 100644
--- a/include/hw/scsi/esp.h
+++ b/include/hw/scsi/esp.h
@@ -41,6 +41,7 @@ struct ESPState {
uint32_t cmdlen;
uint32_t do_cmd;
+ bool data_in_ready;
int dma_enabled;
uint32_t async_len;