Print this page
XXXX introduce drv_sectohz
*** 6212,6222 ****
* wait state (with an intr outstanding) then we need to wait till the
* intr completes and starts the next cmd. We want to wait for
* SD_WAIT_CMDS_COMPLETE seconds before failing the DDI_SUSPEND.
*/
wait_cmds_complete = ddi_get_lbolt() +
! (sd_wait_cmds_complete * drv_usectohz(1000000));
while (un->un_ncmds_in_transport != 0) {
/*
* Fail if commands do not finish in the specified time.
*/
--- 6212,6222 ----
* wait state (with an intr outstanding) then we need to wait till the
* intr completes and starts the next cmd. We want to wait for
* SD_WAIT_CMDS_COMPLETE seconds before failing the DDI_SUSPEND.
*/
wait_cmds_complete = ddi_get_lbolt() +
! drv_sectohz(sd_wait_cmds_complete);
while (un->un_ncmds_in_transport != 0) {
/*
* Fail if commands do not finish in the specified time.
*/
*** 6845,6855 ****
*/
mutex_enter(&un->un_pm_mutex);
if (un->un_pm_timeid == NULL) {
un->un_pm_timeid =
timeout(sd_pm_timeout_handler,
! un, intvlp * drv_usectohz(1000000));
mutex_exit(&un->un_pm_mutex);
(void) pm_busy_component(SD_DEVINFO(un), 0);
} else {
mutex_exit(&un->un_pm_mutex);
}
--- 6845,6855 ----
*/
mutex_enter(&un->un_pm_mutex);
if (un->un_pm_timeid == NULL) {
un->un_pm_timeid =
timeout(sd_pm_timeout_handler,
! un, drv_sectohz(intvlp));
mutex_exit(&un->un_pm_mutex);
(void) pm_busy_component(SD_DEVINFO(un), 0);
} else {
mutex_exit(&un->un_pm_mutex);
}