From 442de89a9378cd663e71408af0542c013d90a229 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Fri, 12 Jan 2024 12:54:18 +0000 Subject: esp.c: keep track of the DRQ state during DMA Currently the DRQ IRQ is updated every time DMA data is sent/received which is both inefficient and causes excessive logging of the DRQ state. Add a new drq_state bool that only updates the DRQ IRQ if its state changes. This commit adds the new drq_state bool to the migration state: since the version number has already been increased earlier in the series, there is no need to repeat it again here. The DRQ IRQ is (currently) only used for PDMA transfers which already have a migration break in this series so there are no problems setting its value post-load. Signed-off-by: Mark Cave-Ayland Tested-by: Helge Deller Tested-by: Thomas Huth Message-Id: <20240112125420.514425-87-mark.cave-ayland@ilande.co.uk> Signed-off-by: Mark Cave-Ayland --- include/hw/scsi/esp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/hw/scsi/esp.h b/include/hw/scsi/esp.h index c6e8b64..533d856 100644 --- a/include/hw/scsi/esp.h +++ b/include/hw/scsi/esp.h @@ -26,6 +26,7 @@ struct ESPState { uint8_t wregs[ESP_REGS]; qemu_irq irq; qemu_irq drq_irq; + bool drq_state; uint8_t chip_id; bool tchi_written; int32_t ti_size; -- cgit v1.1