Skip to content

Commit

Permalink
esp: use correct type for esp_dma_enable() in sysbus_esp_gpio_demux()
Browse files Browse the repository at this point in the history
The call to esp_dma_enable() was being made with the SYSBUS_ESP type instead of
the ESP type. This meant that when GPIO 1 was being used to trigger a DMA
request from an external DMA controller, the setting of ESPState's dma_enabled
field would clobber unknown memory whilst the dma_cb callback pointer would
typically return NULL so the DMA request would never start.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20230913204410.65650-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit b86dc5c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
mcayland authored and Michael Tokarev committed Oct 3, 2023
1 parent ae0b40d commit 9b7feb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/scsi/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ static void sysbus_esp_gpio_demux(void *opaque, int irq, int level)
parent_esp_reset(s, irq, level);
break;
case 1:
esp_dma_enable(opaque, irq, level);
esp_dma_enable(s, irq, level);
break;
}
}
Expand Down

0 comments on commit 9b7feb8

Please sign in to comment.