Index: ahcisata_core.c =================================================================== RCS file: /cvsroot/src/sys/dev/ic/ahcisata_core.c,v retrieving revision 1.60 diff -u -p -r1.60 ahcisata_core.c --- ahcisata_core.c 11 Nov 2017 16:49:13 -0000 1.60 +++ ahcisata_core.c 9 Dec 2017 16:20:06 -0000 @@ -710,21 +710,11 @@ ahci_exec_fis(struct ata_channel *chp, i int i; uint32_t is; - /* - * Base timeout is specified in ms. - * If we are allowed to sleep, wait a tick each round. - * Otherwise delay for 10ms on each round. - */ - if (flags & AT_WAIT) - timeout = MAX(1, mstohz(timeout)); - else - timeout = timeout / 10; - AHCI_CMDH_SYNC(sc, achp, slot, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); /* start command */ AHCI_WRITE(sc, AHCI_P_CI(chp->ch_channel), 1 << slot); - for (i = 0; i < timeout; i++) { + for (i = 0; i < (timeout / 10); i++) { if ((AHCI_READ(sc, AHCI_P_CI(chp->ch_channel)) & (1 << slot)) == 0) return 0; @@ -799,7 +789,7 @@ again: cmd_tbl->cmdt_cfis[fis_type] = RHD_FISTYPE; cmd_tbl->cmdt_cfis[rhd_c] = drive; cmd_tbl->cmdt_cfis[rhd_control] = WDCTL_RST; - switch(ahci_exec_fis(chp, 100, flags, xfer->c_slot)) { + switch(ahci_exec_fis(chp, 1000, flags, xfer->c_slot)) { case ERR_DF: case TIMEOUT: aprint_error("%s channel %d: setting WDCTL_RST failed "