Print this page
XXXX introduce drv_sectohz

@@ -10057,11 +10057,11 @@
 
         /* If there are any outstanding commands in the queue */
         if (mpt->m_ncmds) {
                 mpt->m_softstate |= MPTSAS_SS_DRAINING;
                 mpt->m_quiesce_timeid = timeout(mptsas_ncmds_checkdrain,
-                    mpt, (MPTSAS_QUIESCE_TIMEOUT * drv_usectohz(1000000)));
+                    mpt, drv_sectohz(MPTSAS_QUIESCE_TIMEOUT));
                 if (cv_wait_sig(&mpt->m_cv, &mpt->m_mutex) == 0) {
                         /*
                          * Quiesce has been interrupted
                          */
                         mpt->m_softstate &= ~MPTSAS_SS_DRAINING;

@@ -10132,12 +10132,11 @@
                             ptgt = refhash_next(mpt->m_targets, ptgt)) {
                                 mptsas_set_throttle(mpt, ptgt, HOLD_THROTTLE);
                         }
 
                         mpt->m_quiesce_timeid = timeout(mptsas_ncmds_checkdrain,
-                            mpt, (MPTSAS_QUIESCE_TIMEOUT *
-                            drv_usectohz(1000000)));
+                            mpt, drv_sectohz(MPTSAS_QUIESCE_TIMEOUT));
                 }
         }
         mutex_exit(&mpt->m_mutex);
 }
 

@@ -13629,11 +13628,11 @@
                 inq83_retry--;
                 if (inq83_retry <= 0) {
                         goto out;
                 }
                 NDBG20(("The GUID is not ready, retry..."));
-                delay(1 * drv_usectohz(1000000));
+                delay(drv_sectohz(1));
                 goto inq83_retry;
         }
 out:
         kmem_free(inq83, inq83_len);
         return (sata_guid);

@@ -14928,11 +14927,11 @@
                          * return value of ddi_devid_scsi_encode equal to
                          * DDI_NOT_WELL_FORMED means DEVID_RETRY, it worth
                          * to retry inquiry page 0x83 and get GUID.
                          */
                         NDBG20(("Not well formed devid, retry..."));
-                        delay(1 * drv_usectohz(1000000));
+                        delay(drv_sectohz(1));
                         continue;
                 } else {
                         mptsas_log(mpt, CE_WARN, "!Encode devid failed for "
                             "path target:%x, lun:%x", target, lun);
                         rval = DDI_FAILURE;