aboutsummaryrefslogtreecommitdiff
path: root/include/hw/scsi
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-01-12 12:53:55 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2024-02-13 19:37:28 +0000
commit82003450666e7a91efcb478e7c7d72d3eb679203 (patch)
tree7ed859323c45b3a6113963e315d428a3b825b2cc /include/hw/scsi
parentcb22ce503851fde104c39670972f91f98cd79a1a (diff)
esp.c: remove unneeded ti_cmd field
According to the datasheet the previous ESP command remains in the ESP_CMD register, which caused a problem when consecutive TI commands were issued as it becomes impossible for the state machine to know when the first TI command finishes. This was the original reason for introducing the ti_cmd field which kept track of the last written command for this purpose. However closer reading of the datasheet shows that a TI command that terminates due to a change of SCSI target phase resets the ESP_CMD register to zero which solves this problem. Now that this has been fixed in the previous commit, remove the unneeded ti_cmd field and access the ESP_CMD register directly instead. Bump the vmstate_esp version to indicate that the ti_cmd field is no longer included. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Helge Deller <deller@gmx.de> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20240112125420.514425-64-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include/hw/scsi')
-rw-r--r--include/hw/scsi/esp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h
index 1036606943..39b416f538 100644
--- a/include/hw/scsi/esp.h
+++ b/include/hw/scsi/esp.h
@@ -41,7 +41,6 @@ struct ESPState {
uint32_t do_cmd;
bool data_ready;
- uint8_t ti_cmd;
int dma_enabled;
uint32_t async_len;
@@ -62,6 +61,8 @@ struct ESPState {
uint8_t mig_ti_buf[ESP_FIFO_SZ];
uint8_t mig_cmdbuf[ESP_CMDFIFO_SZ];
uint32_t mig_cmdlen;
+
+ uint8_t mig_ti_cmd;
};
#define TYPE_SYSBUS_ESP "sysbus-esp"