Print this page
XXXX introduce drv_sectohz

@@ -770,11 +770,11 @@
             sp->session_state);
         while (!((sp->session_state == RDS_SESSION_STATE_CLOSED) ||
             (sp->session_state == RDS_SESSION_STATE_FAILED) ||
             (sp->session_state == RDS_SESSION_STATE_FINI))) {
                 rw_exit(&sp->session_lock);
-                delay(drv_usectohz(1000000));
+                delay(drv_sectohz(1));
                 rw_enter(&sp->session_lock, RW_READER);
                 RDS_DPRINTF2("rds_destroy_session", "SP(%p) State: %d WAITING "
                     "ON SESSION", sp, sp->session_state);
         }
         rw_exit(&sp->session_lock);

@@ -861,11 +861,11 @@
         if (sp_state == RDS_SESSION_STATE_ERROR) {
                 rds_session_close(sp, IBT_BLOCKING, 1);
         }
 
         /* wait 1 sec before re-connecting */
-        delay(drv_usectohz(1000000));
+        delay(drv_sectohz(1));
 
         do {
                 ibt_ip_path_attr_t      ipattr;
                 ibt_ip_addr_t           dstip;
 

@@ -905,11 +905,11 @@
                 }
 
                 RDS_DPRINTF2(LABEL, "ibt_get_ip_paths failed, ret: %d ", ret);
 
                 /* wait 1 sec before re-trying */
-                delay(drv_usectohz(1000000));
+                delay(drv_sectohz(1));
                 cnt++;
         } while (cnt < 5);
 
         if (ret != IBT_SUCCESS) {
                 rw_enter(&sp->session_lock, RW_WRITER);

@@ -1113,11 +1113,11 @@
         /* wait until all the buffers are freed by the sockets */
         while (RDS_GET_RXPKTS_PEND() != 0) {
                 /* wait one second and try again */
                 RDS_DPRINTF2("rds_close_sessions", "waiting on "
                     "pending packets", RDS_GET_RXPKTS_PEND());
-                delay(drv_usectohz(1000000));
+                delay(drv_sectohz(1));
         }
         RDS_DPRINTF2("rds_close_sessions", "No more RX packets pending");
 
         /* close all the sessions */
         rw_enter(&rdsib_statep->rds_sessionlock, RW_WRITER);