Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/dev/sdev_comm.c
          +++ new/usr/src/uts/common/fs/dev/sdev_comm.c
↓ open down ↓ 102 lines elided ↑ open up ↑
 103  103  }
 104  104  
 105  105  /*
 106  106   * Wait for node to be created
 107  107   */
 108  108  int
 109  109  sdev_wait4lookup(struct sdev_node *dv, int cmd)
 110  110  {
 111  111          clock_t expire;
 112  112          clock_t rv;
 113      -        clock_t wakeup = drv_usectohz(2 * 1000000);
      113 +        clock_t wakeup = drv_sectohz(2);
 114  114          int rval = ENOENT;
 115  115          int is_lookup = (cmd == SDEV_LOOKUP);
 116  116  
 117  117          ASSERT(cmd == SDEV_LOOKUP || cmd == SDEV_READDIR);
 118  118          ASSERT(MUTEX_HELD(&dv->sdev_lookup_lock));
 119  119  
 120  120          /* tick value at which wait expires */
 121  121          expire = ddi_get_lbolt() +
 122      -            drv_usectohz(dev_node_wait_timeout * 1000000);
      122 +            drv_sectohz(dev_node_wait_timeout);
 123  123  
 124  124          sdcmn_err6(("wait4lookup %s %s, %ld %d\n",
 125  125              is_lookup ? "lookup" : "readdir",
 126  126              dv->sdev_name, expire - ddi_get_lbolt(), dv->sdev_state));
 127  127  
 128  128          if (SDEV_IS_LGWAITING(dv)) {
 129  129                  /* devfsadm nodes */
 130  130                  while (DEVNAME_DEVFSADM_IS_RUNNING(devfsadm_state) &&
 131  131                      !sdev_devfsadm_revoked()) {
 132  132                          /* wait 2 sec and check devfsadm completion */
↓ open down ↓ 94 lines elided ↑ open up ↑
 227  227  static int
 228  228  sdev_open_upcall_door()
 229  229  {
 230  230          int error;
 231  231          clock_t rv;
 232  232          clock_t expire;
 233  233  
 234  234          ASSERT(sdev_upcall_door == NULL);
 235  235  
 236  236          /* timeout expires this many ticks in the future */
 237      -        expire = ddi_get_lbolt() + drv_usectohz(dev_devfsadm_startup * 1000000);
      237 +        expire = ddi_get_lbolt() + drv_sectohz(dev_devfsadm_startup);
 238  238  
 239  239          if (sdev_door_upcall_filename == NULL) {
 240  240                  if ((error = sdev_start_devfsadmd()) != 0) {
 241  241                          return (error);
 242  242                  }
 243  243  
 244  244                  /* wait for devfsadmd start */
 245  245                  mutex_enter(&devfsadm_lock);
 246  246                  while (sdev_door_upcall_filename == NULL) {
 247  247                          sdcmn_err6(("waiting for dev_door creation, %ld\n",
↓ open down ↓ 234 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX