Print this page
XXXX introduce drv_sectohz

@@ -6212,11 +6212,11 @@
          * 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));
+            drv_sectohz(sd_wait_cmds_complete);
 
         while (un->un_ncmds_in_transport != 0) {
                 /*
                  * Fail if commands do not finish in the specified time.
                  */

@@ -6845,11 +6845,11 @@
                          */
                         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));
+                                    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);
                         }