aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-03-05 15:55:28 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-03-09 09:29:10 +0000
commit77987ef5a3458c24211d2766164acffc160bfc33 (patch)
tree8bd2e44ef1649f3e805b0340a48a94ec9b5c7d56 /include
parentd0243b094b681ef38c1d277f519eb21f336fd214 (diff)
downloadqemu-77987ef5a3458c24211d2766164acffc160bfc33.zip
qemu-77987ef5a3458c24211d2766164acffc160bfc33.tar.gz
qemu-77987ef5a3458c24211d2766164acffc160bfc33.tar.bz2
esp: convert ESPState pdma_cb from a function pointer to an integer
This prepares for the inclusion of the current PDMA callback in the migration stream since the callback is referenced by an integer instead of a function pointer. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20220305155530.9265-9-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/hw/scsi/esp.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h
index b1ec276..13b1749 100644
--- a/include/hw/scsi/esp.h
+++ b/include/hw/scsi/esp.h
@@ -51,7 +51,7 @@ struct ESPState {
ESPDMAMemoryReadWriteFunc dma_memory_write;
void *dma_opaque;
void (*dma_cb)(ESPState *s);
- void (*pdma_cb)(ESPState *s);
+ uint8_t pdma_cb;
uint8_t mig_version_id;
@@ -150,6 +150,15 @@ struct SysBusESPState {
#define TCHI_FAS100A 0x4
#define TCHI_AM53C974 0x12
+/* PDMA callbacks */
+enum pdma_cb {
+ SATN_PDMA_CB = 0,
+ S_WITHOUT_SATN_PDMA_CB = 1,
+ SATN_STOP_PDMA_CB = 2,
+ WRITE_RESPONSE_PDMA_CB = 3,
+ DO_DMA_PDMA_CB = 4
+};
+
void esp_dma_enable(ESPState *s, int irq, int level);
void esp_request_cancelled(SCSIRequest *req);
void esp_command_complete(SCSIRequest *req, size_t resid);