Print this page
XXXX introduce drv_sectohz

@@ -109,11 +109,11 @@
                         MBX_REGISTER_UNLOCK(ha);
                         return (QL_LOCK_TIMEOUT);
                 }
 
                 /* Set timeout after command that is running. */
-                timer = (mcp->timeout + 20) * drv_usectohz(1000000);
+                timer = drv_sectohz(mcp->timeout + 20);
                 cv_stat = cv_reltimedwait_sig(&ha->cv_mbx_wait,
                     &ha->pha->mbx_mutex, timer, TR_CLOCK_TICK);
                 if (cv_stat == -1 || cv_stat == 0) {
                         /*
                          * The timeout time 'timer' was

@@ -164,11 +164,11 @@
         /* Wait for command to complete. */
         if (ha->flags & INTERRUPTS_ENABLED &&
             !(ha->task_daemon_flags & (TASK_THREAD_CALLED |
             TASK_DAEMON_POWERING_DOWN)) &&
             !ddi_in_panic()) {
-                timer = mcp->timeout * drv_usectohz(1000000);
+                timer = drv_sectohz(mcp->timeout);
                 while (!(ha->mailbox_flags & (MBX_INTERRUPT | MBX_ABORT)) &&
                     !(ha->task_daemon_flags & ISP_ABORT_NEEDED)) {
 
                         if (cv_reltimedwait(&ha->cv_mbx_intr,
                             &ha->pha->mbx_mutex, timer, TR_CLOCK_TICK) == -1) {