--- ahci.c.prev 2011-09-11 16:52:49.000000000 +0300 +++ ahci.c 2011-09-11 17:01:19.000000000 +0300 @@ -1769,6 +1769,7 @@ static void ahci_execute_transaction(struct ahci_slot *slot) { device_t dev = slot->dev; + struct ahci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ahci_channel *ch = device_get_softc(dev); struct ahci_cmd_tab *ctp; struct ahci_cmd_list *clp; @@ -1890,8 +1891,17 @@ ahci_execute_transaction(struct ahci_slo } /* Kick controller into sane state and enable FBS. */ - if (softreset == 2) + if (softreset == 2) { ch->eslots |= (1 << slot->slot); + /* Enable wanted port interrupts */ + ATA_OUTL(ch->r_mem, AHCI_P_IE, + (((ch->pm_level != 0) ? AHCI_P_IX_CPD | AHCI_P_IX_MP : 0) | + AHCI_P_IX_TFE | AHCI_P_IX_HBF | + AHCI_P_IX_HBD | AHCI_P_IX_IF | AHCI_P_IX_OF | + ((ch->pm_level == 0) ? AHCI_P_IX_PRC : 0) | AHCI_P_IX_PC | + AHCI_P_IX_DP | AHCI_P_IX_UF | (ctlr->ccc ? 0 : AHCI_P_IX_SDB) | + AHCI_P_IX_DS | AHCI_P_IX_PS | (ctlr->ccc ? 0 : AHCI_P_IX_DHR))); + } ahci_end_transaction(slot, et); return; }