Print this page
XXXX introduce drv_sectohz

@@ -65,11 +65,11 @@
         clock_t time;
 
         /* Set thread timeout */
         if (cfg[CFG_TIMEOUT_ENABLE].current) {
                 (void) drv_getparm(LBOLT, &time);
-                time += (timeout * drv_usectohz(1000000));
+                time += drv_sectohz(timeout);
         } else {
                 time = -1;
         }
 
         return (time);

@@ -129,11 +129,11 @@
 
         /* If timer is still enabled, restart it */
         if (!(hba->timer_flags & EMLXS_TIMER_KILL)) {
                 hba->timer_id =
                     timeout(emlxs_timer, (void *)hba,
-                    (EMLXS_TIMER_PERIOD * drv_usectohz(1000000)));
+                    drv_sectohz(EMLXS_TIMER_PERIOD));
         } else {
                 hba->timer_id = 0;
                 hba->timer_flags |= EMLXS_TIMER_ENDED;
         }
 

@@ -238,11 +238,11 @@
         /* Restart the timer */
         mutex_enter(&EMLXS_TIMER_LOCK);
         if (!hba->timer_id) {
                 hba->timer_flags = 0;
                 hba->timer_id =
-                    timeout(emlxs_timer, (void *)hba, drv_usectohz(1000000));
+                    timeout(emlxs_timer, (void *)hba, drv_sectohz(1));
         }
         mutex_exit(&EMLXS_TIMER_LOCK);
 
 } /* emlxs_timer_start() */