From bb0bc7bbc9764a5e9e81756819838c5db88652b8 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Thu, 4 Mar 2021 22:10:39 +0000 Subject: esp: accumulate SCSI commands for PDMA transfers in cmdbuf instead of pdma_buf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ESP SCSI commands are already accumulated in cmdbuf and so there is no need to keep a separate pdma_buf buffer. Accumulate SCSI commands for PDMA transfers in cmdbuf instead of pdma_buf so update cmdlen accordingly and change pdma_origin for PDMA transfers to CMD which allows the PDMA origin to be removed. This commit also removes a stray memcpy() from get_cmd() which is a no-op because cmdlen is always zero at the start of a command. Notionally the removal of pdma_buf from vmstate_esp_pdma also breaks migration compatibility for the PDMA subsection until its complete removal by the end of the series. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20210304221103.6369-19-mark.cave-ayland@ilande.co.uk> --- include/hw/scsi/esp.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/hw/scsi/esp.h') diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h index ff50c9e7d8..600d0c31ab 100644 --- a/include/hw/scsi/esp.h +++ b/include/hw/scsi/esp.h @@ -16,7 +16,6 @@ typedef void (*ESPDMAMemoryReadWriteFunc)(void *opaque, uint8_t *buf, int len); typedef struct ESPState ESPState; enum pdma_origin_id { - PDMA, TI, CMD, ASYNC, @@ -57,7 +56,6 @@ struct ESPState { ESPDMAMemoryReadWriteFunc dma_memory_write; void *dma_opaque; void (*dma_cb)(ESPState *s); - uint8_t pdma_buf[32]; int pdma_origin; uint32_t pdma_len; uint32_t pdma_start; -- cgit v1.2.3