Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge_mpi.c
          +++ new/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge_mpi.c
↓ open down ↓ 314 lines elided ↑ open up ↑
 315  315                  if (rtn_val != DDI_SUCCESS) {
 316  316                          cmn_err(CE_WARN, "%s(%d) ql_issue_mailbox_cmd failed",
 317  317                              __func__, qlge->instance);
 318  318                          goto err;
 319  319                  }
 320  320                  qlge->mbx_wait_completion = 1;
 321  321                  while (!done && qlge->mbx_wait_completion && !ddi_in_panic()) {
 322  322                          /* default 5 seconds from now to timeout */
 323  323                          timer = ddi_get_lbolt();
 324  324                          if (mbx_cmd->timeout) {
 325      -                                timer +=
 326      -                                    mbx_cmd->timeout * drv_usectohz(1000000);
      325 +                                timer += drv_sectohz(mbx_cmd->timeout);
 327  326                          } else {
 328      -                                timer += 5 * drv_usectohz(1000000);
      327 +                                timer += drv_sectohz(5);
 329  328                          }
 330  329                          if (cv_timedwait(&qlge->cv_mbx_intr, &qlge->mbx_mutex,
 331  330                              timer) == -1) {
 332  331                                  /*
 333  332                                   * The timeout time 'timer' was
 334  333                                   * reached or expired without the condition
 335  334                                   * being signaled.
 336  335                                   */
 337  336                                  cmn_err(CE_WARN, "%s(%d) Wait for Mailbox cmd "
 338  337                                      "complete timeout.",
↓ open down ↓ 889 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX