Print this page
XXXX introduce drv_sectohz

@@ -2185,11 +2185,11 @@
          * Wait for send to complete
          */
         ASSERT(wd != NULL);
         mutex_enter(&wd->sendwait_lock);
         if (wd->status == (uint_t)SEND_WAIT) {
-                timout = drv_usectohz(SEND_WAIT_TIME * 1000000) +
+                timout = drv_sectohz(SEND_WAIT_TIME) +
                     ddi_get_lbolt();
 
                 if (qp->mode == RIB_SERVER) {
                         while ((cv_wait_ret = cv_timedwait(&wd->wait_cv,
                             &wd->sendwait_lock, timout)) > 0 &&

@@ -2436,11 +2436,11 @@
         } else {
                 /*
                  * Wait for RDMA_DONE from remote end
                  */
                 cv_wait_ret = cv_reltimedwait(&rd->rdma_done_cv,
-                    &qp->rdlist_lock, drv_usectohz(REPLY_WAIT_TIME * 1000000),
+                    &qp->rdlist_lock, drv_sectohz(REPLY_WAIT_TIME),
                     TR_CLOCK_TICK);
 
                 rdma_done_rm(qp, rd);
 
                 if (cv_wait_ret < 0) {

@@ -2684,11 +2684,11 @@
                 /*
                  * If message not yet received, wait.
                  */
                 if (rep->status == (uint_t)REPLY_WAIT) {
                         timout = ddi_get_lbolt() +
-                            drv_usectohz(REPLY_WAIT_TIME * 1000000);
+                            drv_sectohz(REPLY_WAIT_TIME);
 
                         while ((cv_wait_ret = cv_timedwait_sig(&rep->wait_cv,
                             &qp->replylist_lock, timout)) > 0 &&
                             rep->status == (uint_t)REPLY_WAIT)
                                 ;

@@ -4279,11 +4279,11 @@
                                  * Hold a reference to this conn before
                                  * we give up the lock.
                                  */
                                 cn->c_ref++;
                                 timout =  ddi_get_lbolt() +
-                                    drv_usectohz(CONN_WAIT_TIME * 1000000);
+                                    drv_sectohz(CONN_WAIT_TIME);
                                 while ((cv_stat = cv_timedwait_sig(&cn->c_cv,
                                     &cn->c_lock, timout)) > 0 &&
                                     cn->c_state == C_CONN_PEND)
                                         ;
                                 if (cv_stat == 0) {