Print this page
XXXX introduce drv_sectohz

@@ -1496,11 +1496,11 @@
                 /* Add adapter structure to link list. */
                 ql_add_link_b(&ql_hba, &ha->hba);
 
                 /* Start one second driver timer. */
                 if (ql_timer_timeout_id == NULL) {
-                        ql_timer_ticks = drv_usectohz(1000000);
+                        ql_timer_ticks = drv_sectohz(1);
                         ql_timer_timeout_id = timeout(ql_timer, (void *)0,
                             ql_timer_ticks);
                 }
 
                 /* Release global state lock. */

@@ -1971,11 +1971,11 @@
 
                 delay_cnt = 0;
                 ha->flags |= ADAPTER_SUSPENDED;
                 while (ha->flags & ADAPTER_TIMER_BUSY && delay_cnt++ < 10) {
                         ADAPTER_STATE_UNLOCK(ha);
-                        delay(drv_usectohz(1000000));
+                        delay(drv_sectohz(1));
                         ADAPTER_STATE_LOCK(ha);
                 }
                 if (ha->busy || ha->flags & ADAPTER_TIMER_BUSY) {
                         ha->flags &= ~ADAPTER_SUSPENDED;
                         ADAPTER_STATE_UNLOCK(ha);

@@ -11867,11 +11867,11 @@
         }
 
         if (lock_needed == TRUE) {
                 /* Acquire mailbox register lock. */
                 MBX_REGISTER_LOCK(ha);
-                timer = (ha->mcp->timeout + 2) * drv_usectohz(1000000);
+                timer = drv_sectohz(ha->mcp->timeout + 2);
 
                 /* Check for mailbox available, if not wait for signal. */
                 while (ha->mailbox_flags & MBX_BUSY_FLG) {
                         ha->mailbox_flags = (uint8_t)
                             (ha->mailbox_flags | MBX_WANT_FLG);

@@ -15902,11 +15902,11 @@
 }
 
 static int
 ql_suspend_adapter(ql_adapter_state_t *ha)
 {
-        clock_t timer = 32 * drv_usectohz(1000000);
+        clock_t timer = drv_sectohz(32);
 
         QL_PRINT_3(CE_CONT, "(%d): started\n", ha->instance);
 
         /*
          * First we will claim mbox ownership so that no