From 4e78f3bf357e0ef2f67e372097f2be8fe0521814 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Thu, 4 Mar 2021 22:10:54 +0000 Subject: 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 Reviewed-by: Laurent Vivier Message-Id: <20210304221103.6369-34-mark.cave-ayland@ilande.co.uk> --- include/hw/scsi/esp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw/scsi/esp.h') 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; -- cgit v1.2.3