Print this page
XXXX introduce drv_sectohz

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/usb/clients/usbser/usbser_keyspan/keyspan_dsd.c
          +++ new/usr/src/uts/common/io/usb/clients/usbser/usbser_keyspan/keyspan_dsd.c
↓ open down ↓ 2522 lines elided ↑ open up ↑
2523 2523   * 'timeout' is in seconds, zero means wait forever
2524 2524   */
2525 2525  static int
2526 2526  keyspan_wait_tx_drain(keyspan_port_t *kp, int timeout)
2527 2527  {
2528 2528          clock_t until;
2529 2529          int     over = 0;
2530 2530  
2531 2531          USB_DPRINTF_L4(DPRINT_OUT_DATA, kp->kp_lh, "keyspan_wait_tx_drain:"
2532 2532              "timeout = %d", timeout);
2533      -        until = ddi_get_lbolt() + drv_usectohz(1000000 * timeout);
     2533 +        until = ddi_get_lbolt() + drv_sectohz(timeout);
2534 2534  
2535 2535          while (kp->kp_tx_mp && !over) {
2536 2536                  if (timeout > 0) {
2537 2537                          over = (cv_timedwait_sig(&kp->kp_tx_cv,
2538 2538                              &kp->kp_mutex, until) <= 0);
2539 2539                  } else {
2540 2540                          over = (cv_wait_sig(&kp->kp_tx_cv, &kp->kp_mutex) == 0);
2541 2541                  }
2542 2542          }
2543 2543  
↓ open down ↓ 754 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX