Print this page
XXXX introduce drv_sectohz

@@ -923,11 +923,11 @@
 
         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)));
+            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,11 +4378,11 @@
                     (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));
+                            drv_sectohz(AAC_QUIESCE_TICK));
         }
         mutex_exit(&softs->io_lock);
 }
 
 /*

@@ -4393,11 +4393,11 @@
 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));
+                    drv_sectohz(AAC_QUIESCE_TICK));
         }
         softs->ndrains++;
 }
 
 /*

@@ -6683,11 +6683,11 @@
                         }
 
                         if (acp->timeout <= softs_timebase) {
                                 aac_cmd_timeout(softs, acp);
                                 time_out = 1;
-                                time_adjust = aac_tick * drv_usectohz(1000000);
+                                time_adjust = drv_sectohz(aac_tick);
                                 break; /* timeout happened */
                         } else {
                                 break; /* no timeout */
                         }
                 }

@@ -6755,11 +6755,11 @@
         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)));
+                    drv_sectohz(aac_tick));
         } else {
                 mutex_exit(&softs->time_mutex);
                 return;
         }