diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index c2b4432b94..749f0efa1d 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -740,6 +740,9 @@ static bool ahci_map_clb_address(AHCIDevice *ad) static void ahci_unmap_clb_address(AHCIDevice *ad) { + /* Cancel in-flight reads that would complete against a cleared cur_cmd. */ + ide_cancel_dma_sync(ide_bus_active_if(&ad->port)); + if (ad->lst == NULL) { trace_ahci_unmap_clb_address_null(ad->hba, ad->port_no); return;