diff --git a/sys/dev/disk/ahci/ahci.c b/sys/dev/disk/ahci/ahci.c index 0fda0a32..65bb7810 100644 --- a/sys/dev/disk/ahci/ahci.c +++ b/sys/dev/disk/ahci/ahci.c @@ -2265,6 +2265,13 @@ ahci_beg_exclusive_access(struct ahci_port *ap, struct ata_port *at) ap->ap_flags |= AP_F_EXCLUSIVE_ACCESS; while (ap->ap_active || ap->ap_sactive) { ahci_port_intr(ap, 1); + /* + * Deferred-expired CCBs cannot be retired by the + * interrupt code alone; the callout is deadlocked + * while we hold the port lock (same reasoning as + * ahci_poll()). + */ + ahci_check_active_timeouts(ap); ahci_os_softsleep(); } }