From 799d90d818ba38997e9f5de2163bbfc96256ac0b Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Thu, 4 Mar 2021 22:10:58 +0000 Subject: esp: transition to message out phase after SATN and stop command The SCSI bus should remain in the message out phase after the SATN and stop command rather than transitioning to the command phase. A new ESPState variable cmdbuf_cdb_offset is added which stores the offset of the CDB from the start of cmdbuf when accumulating extended message out phase data. Currently any extended message out data is discarded in do_cmd() before the CDB is processed in do_busid_cmd(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-Id: <20210304221103.6369-38-mark.cave-ayland@ilande.co.uk> --- include/hw/scsi/esp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h index 7d88fa0f92..f697645c05 100644 --- a/include/hw/scsi/esp.h +++ b/include/hw/scsi/esp.h @@ -37,6 +37,7 @@ struct ESPState { SCSIRequest *current_req; uint8_t cmdbuf[ESP_CMDBUF_SZ]; uint32_t cmdlen; + uint8_t cmdbuf_cdb_offset; uint32_t do_cmd; bool data_in_ready; @@ -136,6 +137,7 @@ struct SysBusESPState { #define INTR_RST 0x80 #define SEQ_0 0x0 +#define SEQ_MO 0x1 #define SEQ_CD 0x4 #define CFG1_RESREPT 0x40 -- cgit v1.2.3-55-g7522