diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index 7f4acb54c3a6..e7f800bd4ea4 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -3862,10 +3862,14 @@ ena_detach(device_t pdev) ena_com_delete_host_info(ena_dev); - ena_com_admin_destroy(ena_dev); - ena_free_irqs(adapter); + ena_com_abort_admin_commands(ena_dev); + + ena_com_wait_for_abort_completion(ena_dev); + + ena_com_admin_destroy(ena_dev); + ena_com_mmio_reg_read_request_destroy(ena_dev); ena_free_pci_resources(adapter);