Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/comstar/port/srpt/srpt_stp.c
          +++ new/usr/src/uts/common/io/comstar/port/srpt/srpt_stp.c
↓ open down ↓ 377 lines elided ↑ open up ↑
 378  378                      " registered");
 379  379                  return (tgt);
 380  380          }
 381  381  
 382  382          if (status == STMF_BUSY) {
 383  383                  /*
 384  384                   * This is only done on an administrative thread of
 385  385                   * execution so it is ok to take a while.
 386  386                   */
 387  387                  SRPT_DPRINTF_L3("stp_alloc_port, delaying");
 388      -                delay(2 * drv_usectohz(1000000));
      388 +                delay(drv_sectohz(2));
 389  389                  goto retry_registration;
 390  390          }
 391  391          SRPT_DPRINTF_L1("stp_alloc_port, STMF register local port err(0x%llx)",
 392  392              (u_longlong_t)status);
 393  393  
 394  394          SRPT_DPRINTF_L3("stp_alloc_port, free STMF local port");
 395  395          cv_destroy(&tgt->tp_offline_complete);
 396  396          mutex_destroy(&tgt->tp_ch_list_lock);
 397  397          mutex_destroy(&tgt->tp_lock);
 398  398          if (tgt->tp_hw_port) {
↓ open down ↓ 90 lines elided ↑ open up ↑
 489  489          }
 490  490          mutex_exit(&tgt->tp_lock);
 491  491  
 492  492          SRPT_DPRINTF_L3("stp_destroy_port: IOC (0x%016llx) Target"
 493  493              " SRP off-line complete", (u_longlong_t)guid);
 494  494  
 495  495          /* loop waiting for all I/O to drain */
 496  496          for (;;) {
 497  497                  status = stmf_deregister_local_port(tgt->tp_lport);
 498  498                  if (status == STMF_BUSY) {
 499      -                        delay(drv_usectohz(1000000));
      499 +                        delay(drv_sectohz(1));
 500  500                  } else {
 501  501                          break;
 502  502                  }
 503  503          }
 504  504  
 505  505          if (status == STMF_SUCCESS) {
 506  506                  SRPT_DPRINTF_L3("stp_destroy_port, LPORT de-register"
 507  507                      " complete");
 508  508          } else {
 509  509                  /*
↓ open down ↓ 1170 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX