Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/sbp2/sbp2.c
          +++ new/usr/src/uts/common/io/sbp2/sbp2.c
↓ open down ↓ 931 lines elided ↑ open up ↑
 932  932  
 933  933          /*
 934  934           * In theory, we should schedule task timeout after it's been submitted.
 935  935           * However, some fast tasks complete even before timeout is scheduled.
 936  936           * To avoid additional complications in the code, schedule timeout now.
 937  937           */
 938  938          ASSERT(task->ts_timeout_id == 0);
 939  939          task->ts_time_start = gethrtime();
 940  940          if (task->ts_timeout > 0) {
 941  941                  task->ts_timeout_id = timeout(sbp2_task_timeout, task,
 942      -                    task->ts_timeout * drv_usectohz(1000000));
      942 +                    drv_sectohz(task->ts_timeout));
 943  943          }
 944  944  
 945  945          /* notify fetch agent */
 946  946          ap->a_state = SBP2_AGENT_STATE_ACTIVE;
 947  947          mutex_exit(&ap->a_mutex);
 948  948          ret = sbp2_agent_write_orbp(ap, task->ts_buf->bb_baddr,
 949  949              &task->ts_bus_error);
 950  950          tp->t_stat.stat_submit_orbp++;
 951  951          mutex_enter(&ap->a_mutex);
 952  952  
↓ open down ↓ 831 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX