Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/fibre-channel/fca/oce/oce_mbx.c
          +++ new/usr/src/uts/common/io/fibre-channel/fca/oce/oce_mbx.c
↓ open down ↓ 125 lines elided ↑ open up ↑
 126  126   *
 127  127   * return 0=ready, ETIMEDOUT=>not ready but timed out
 128  128   */
 129  129  int
 130  130  oce_mbox_wait(struct oce_dev *dev, uint32_t tmo_sec)
 131  131  {
 132  132          clock_t tmo;
 133  133          clock_t now, tstamp;
 134  134          pd_mpu_mbox_db_t mbox_db;
 135  135  
 136      -        tmo = (tmo_sec > 0) ? drv_usectohz(tmo_sec * 1000000) :
      136 +        tmo = (tmo_sec > 0) ? drv_sectohz(tmo_sec) :
 137  137              drv_usectohz(DEFAULT_MQ_MBOX_TIMEOUT);
 138  138  
 139  139          /* Add the default timeout to wait for a mailbox to complete */
 140  140          tmo += drv_usectohz(MBX_READY_TIMEOUT);
 141  141  
 142  142          tstamp = ddi_get_lbolt();
 143  143          for (;;) {
 144  144                  now = ddi_get_lbolt();
 145  145                  if ((now - tstamp) >= tmo) {
 146  146                          tmo = 0;
↓ open down ↓ 1312 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX