Print this page
XXXX introduce drv_sectohz

@@ -2626,11 +2626,11 @@
                                 rval = fops->sfo_analyze_sense(svp->svp_psd,
                                     sns, vlun->svl_fops_ctpriv);
                                 if (rval == SCSI_SENSE_NOT_READY) {
                                         max_retry = vhci_prout_not_ready_retry;
                                         retry = nr_retry++;
-                                        delay(1*drv_usectohz(1000000));
+                                        delay(drv_sectohz(1));
                                 } else {
                                         /* chk for state change and update */
                                         if (rval == SCSI_SENSE_STATE_CHANGED) {
                                                 int held;
                                                 VHCI_HOLD_LUN(vlun,

@@ -5335,11 +5335,11 @@
 
         VHCI_DEBUG(1, (CE_NOTE, vdip, "!vhci_pathinfo_offline: "
             "%d cmds pending on path: 0x%p\n", svp->svp_cmds, (void *)pip));
         while (svp->svp_cmds != 0) {
                 if (cv_reltimedwait(&svp->svp_cv, &svp->svp_mutex,
-                    drv_usectohz(vhci_path_quiesce_timeout * 1000000),
+                    drv_sectohz(vhci_path_quiesce_timeout),
                     TR_CLOCK_TICK) == -1) {
                         /*
                          * The timeout time reached without the condition
                          * being signaled.
                          */

@@ -5369,11 +5369,11 @@
                             &svp->svp_psd->sd_address, TRUE,
                             VHCI_DEPTH_TARGET) == 0) {
                                 VHCI_DEBUG(1, (CE_NOTE, NULL,
                                     "!vhci_pathinfo_offline (pip:%p):"
                                     "reset failed, retrying\n", (void *)pip));
-                                delay(1*drv_usectohz(1000000));
+                                delay(drv_sectohz(1));
                                 if (vhci_recovery_reset(svp->svp_svl,
                                     &svp->svp_psd->sd_address, TRUE,
                                     VHCI_DEPTH_TARGET) == 0) {
                                         VHCI_DEBUG(1, (CE_NOTE, NULL,
                                             "!vhci_pathinfo_offline "

@@ -7509,11 +7509,11 @@
                 ndi_devi_exit(cdip, circular);
                 svp = (scsi_vhci_priv_t *)mdi_pi_get_vhci_private(pip);
                 mutex_enter(&svp->svp_mutex);
                 while (svp->svp_cmds != 0) {
                         if (cv_reltimedwait(&svp->svp_cv, &svp->svp_mutex,
-                            drv_usectohz(vhci_path_quiesce_timeout * 1000000),
+                            drv_sectohz(vhci_path_quiesce_timeout),
                             TR_CLOCK_TICK) == -1) {
                                 mutex_exit(&svp->svp_mutex);
                                 mdi_rele_path(pip);
                                 VHCI_DEBUG(1, (CE_WARN, NULL,
                                     "Quiesce of lun is not successful "

@@ -8357,11 +8357,11 @@
                 break;
         case TRAN_BUSY:
                 VHCI_DEBUG(1, (CE_NOTE, NULL, "vhci_uscsi_send_sense: "
                     "transport busy, setting timeout."));
                 vhci_restart_timeid = timeout(vhci_uscsi_restart_sense, rqpkt,
-                    (drv_usectohz(5 * 1000000)));
+                    drv_sectohz(5));
                 break;
         default:
                 VHCI_DEBUG(1, (CE_NOTE, NULL, "vhci_uscsi_send_sense: "
                     "transport failed"));
                 scsi_free_consistent_buf(rqbp);