Print this page
XXXX introduce drv_sectohz
*** 923,933 ****
aac_unhold_bus(softs, AAC_IOCMD_SYNC | AAC_IOCMD_ASYNC);
/* Create a thread for command timeout */
softs->timeout_id = timeout(aac_timer, (void *)softs,
! (aac_tick * drv_usectohz(1000000)));
/* Common attach is OK, so we are attached! */
ddi_report_dev(dip);
AACDB_PRINT(softs, CE_NOTE, "aac attached ok");
return (DDI_SUCCESS);
--- 923,933 ----
aac_unhold_bus(softs, AAC_IOCMD_SYNC | AAC_IOCMD_ASYNC);
/* Create a thread for command timeout */
softs->timeout_id = timeout(aac_timer, (void *)softs,
! drv_sectohz(aac_tick));
/* Common attach is OK, so we are attached! */
ddi_report_dev(dip);
AACDB_PRINT(softs, CE_NOTE, "aac attached ok");
return (DDI_SUCCESS);
*** 4378,4388 ****
(softs->bus_throttle[AAC_CMDQ_SYNC] > 0 ||
softs->bus_ncmds[AAC_CMDQ_SYNC] == 0))
cv_broadcast(&softs->drain_cv);
else
softs->drain_timeid = timeout(aac_check_drain, softs,
! AAC_QUIESCE_TICK * drv_usectohz(1000000));
}
mutex_exit(&softs->io_lock);
}
/*
--- 4378,4388 ----
(softs->bus_throttle[AAC_CMDQ_SYNC] > 0 ||
softs->bus_ncmds[AAC_CMDQ_SYNC] == 0))
cv_broadcast(&softs->drain_cv);
else
softs->drain_timeid = timeout(aac_check_drain, softs,
! drv_sectohz(AAC_QUIESCE_TICK));
}
mutex_exit(&softs->io_lock);
}
/*
*** 4393,4403 ****
aac_start_drain(struct aac_softstate *softs)
{
if (softs->ndrains == 0) {
ASSERT(softs->drain_timeid == 0);
softs->drain_timeid = timeout(aac_check_drain, softs,
! AAC_QUIESCE_TICK * drv_usectohz(1000000));
}
softs->ndrains++;
}
/*
--- 4393,4403 ----
aac_start_drain(struct aac_softstate *softs)
{
if (softs->ndrains == 0) {
ASSERT(softs->drain_timeid == 0);
softs->drain_timeid = timeout(aac_check_drain, softs,
! drv_sectohz(AAC_QUIESCE_TICK));
}
softs->ndrains++;
}
/*
*** 6683,6693 ****
}
if (acp->timeout <= softs_timebase) {
aac_cmd_timeout(softs, acp);
time_out = 1;
! time_adjust = aac_tick * drv_usectohz(1000000);
break; /* timeout happened */
} else {
break; /* no timeout */
}
}
--- 6683,6693 ----
}
if (acp->timeout <= softs_timebase) {
aac_cmd_timeout(softs, acp);
time_out = 1;
! time_adjust = drv_sectohz(aac_tick);
break; /* timeout happened */
} else {
break; /* no timeout */
}
}
*** 6755,6765 ****
mutex_enter(&softs->time_mutex);
/* If timer is being stopped, exit */
if (softs->timeout_id) {
softs->timeout_id = timeout(aac_timer, (void *)softs,
! (aac_tick * drv_usectohz(1000000)));
} else {
mutex_exit(&softs->time_mutex);
return;
}
--- 6755,6765 ----
mutex_enter(&softs->time_mutex);
/* If timer is being stopped, exit */
if (softs->timeout_id) {
softs->timeout_id = timeout(aac_timer, (void *)softs,
! drv_sectohz(aac_tick));
} else {
mutex_exit(&softs->time_mutex);
return;
}