Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/scsi/impl/scsi_hba.c
          +++ new/usr/src/uts/common/io/scsi/impl/scsi_hba.c
↓ open down ↓ 5700 lines elided ↑ open up ↑
5701 5701          struct scsi_hba_barrier *b;
5702 5702          struct scsi_hba_barrier **bp;
5703 5703          clock_t                 endtime;
5704 5704  
5705 5705          ASSERT(scsi_hba_devi_is_barrier(probe));
5706 5706  
5707 5707          /* HBA is no longer responsible for nodes on the barrier list. */
5708 5708          scsi_hba_barrier_tran_tgt_free(probe);
5709 5709          nb = kmem_alloc(sizeof (struct scsi_hba_barrier), KM_SLEEP);
5710 5710          mutex_enter(&scsi_hba_barrier_mutex);
5711      -        endtime = ddi_get_lbolt() + drv_usectohz(seconds * MICROSEC);
     5711 +        endtime = ddi_get_lbolt() + drv_sectohz(seconds);
5712 5712          for (bp = &scsi_hba_barrier_list; (b = *bp) != NULL;
5713 5713              bp = &b->barrier_next)
5714 5714                  if (b->barrier_endtime > endtime)
5715 5715                          break;
5716 5716          nb->barrier_next = *bp;
5717 5717          nb->barrier_endtime = endtime;
5718 5718          nb->barrier_probe = probe;
5719 5719          *bp = nb;
5720 5720          if (bp == &scsi_hba_barrier_list)
5721 5721                  (void) cv_signal(&scsi_hba_barrier_cv);
↓ open down ↓ 482 lines elided ↑ open up ↑
6204 6204                  /*
6205 6205                   * NOTE: we could avoid rare case of one second delay by
6206 6206                   * implementing scsi_hba_devi_exit_and_wait based on
6207 6207                   * ndi/mdi_devi_exit_and_wait (and consider switching devcfg.c
6208 6208                   * code to use these ndi/mdi interfaces too).
6209 6209                   */
6210 6210                  scsi_hba_devi_exit(self, *circp);
6211 6211                  mutex_enter(&DEVI(self)->devi_lock);
6212 6212                  (void) cv_timedwait(&DEVI(self)->devi_cv,
6213 6213                      &DEVI(self)->devi_lock,
6214      -                    ddi_get_lbolt() + drv_usectohz(MICROSEC));
     6214 +                    ddi_get_lbolt() + drv_sectohz(1));
6215 6215                  mutex_exit(&DEVI(self)->devi_lock);
6216 6216                  scsi_hba_devi_enter(self, circp);
6217 6217          }
6218 6218          ASSERT(probe == NULL);
6219 6219  
6220 6220          /*
6221 6221           * Search to see if we are requesting a SID node that already exists.
6222 6222           * We hold the HBA (self) and there is not another probe in progress at
6223 6223           * the same @addr. scsi_findchild() does not hold the returned
6224 6224           * devinfo node but this is OK since we hold the HBA (self).
↓ open down ↓ 4263 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX