[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/10] esp: introduce esp_pdma_cb() function
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 07/10] esp: introduce esp_pdma_cb() function |
Date: |
Mon, 28 Feb 2022 22:25:24 +0000 |
This function is to be used to execute the current PDMA callback rather than
dereferencing the ESPState pdma_cb function pointer directly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/scsi/esp.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index d1640218c4..035fb0d1f6 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -200,6 +200,11 @@ static void esp_set_pdma_cb(ESPState *s, void
(*cb)(ESPState *))
s->pdma_cb = cb;
}
+static void esp_pdma_cb(ESPState *s)
+{
+ s->pdma_cb(s);
+}
+
static int esp_select(ESPState *s)
{
int target;
@@ -1268,7 +1273,7 @@ static void sysbus_esp_pdma_write(void *opaque, hwaddr
addr,
esp_pdma_write(s, val);
break;
}
- s->pdma_cb(s);
+ esp_pdma_cb(s);
}
static uint64_t sysbus_esp_pdma_read(void *opaque, hwaddr addr,
@@ -1290,7 +1295,7 @@ static uint64_t sysbus_esp_pdma_read(void *opaque, hwaddr
addr,
break;
}
if (fifo8_num_used(&s->fifo) < 2) {
- s->pdma_cb(s);
+ esp_pdma_cb(s);
}
return val;
}
--
2.20.1
- [PATCH 00/10] q800: migration fixes, Mark Cave-Ayland, 2022/02/28
- [PATCH 02/10] macfb: don't use special irq_state and irq_mask variables in MacfbState, Mark Cave-Ayland, 2022/02/28
- [PATCH 01/10] macfb: add VMStateDescription for MacfbNubusState and MacfbSysBusState, Mark Cave-Ayland, 2022/02/28
- [PATCH 03/10] macfb: increase number of registers saved in MacfbState, Mark Cave-Ayland, 2022/02/28
- [PATCH 04/10] macfb: add VMStateDescription fields for display type and VBL timer, Mark Cave-Ayland, 2022/02/28
- [PATCH 05/10] macfb: set initial value of mode control registers in macfb_common_realize(), Mark Cave-Ayland, 2022/02/28
- [PATCH 06/10] esp: introduce esp_set_pdma_cb() function, Mark Cave-Ayland, 2022/02/28
- [PATCH 07/10] esp: introduce esp_pdma_cb() function,
Mark Cave-Ayland <=
- [PATCH 09/10] esp: include the current PDMA callback in the migration stream, Mark Cave-Ayland, 2022/02/28
- [PATCH 08/10] esp: convert ESPState pdma_cb from a function pointer to an integer, Mark Cave-Ayland, 2022/02/28
- [PATCH 10/10] esp: recreate ESPState current_req after migration, Mark Cave-Ayland, 2022/02/28