Print this page
XXXX introduce drv_sectohz
@@ -1675,11 +1675,11 @@
/* Set host controller soft state to operational */
ohcip->ohci_hc_soft_state = OHCI_CTLR_OPERATIONAL_STATE;
/* Get the number of clock ticks to wait */
- sof_time_wait = drv_usectohz(OHCI_MAX_SOF_TIMEWAIT * 1000000);
+ sof_time_wait = drv_sectohz(OHCI_MAX_SOF_TIMEWAIT);
/* Clear ohci_sof_flag indicating waiting for SOF interrupt */
ohcip->ohci_sof_flag = B_FALSE;
/* Enable the SOF interrupt */
@@ -7510,11 +7510,11 @@
* running and if there are any transfers on the timeout
* list. This timer will be per USB Host Controller.
*/
if ((!ohcip->ohci_timer_id) && (ohcip->ohci_timeout_list)) {
ohcip->ohci_timer_id = timeout(ohci_xfer_timeout_handler,
- (void *)ohcip, drv_usectohz(1000000));
+ (void *)ohcip, drv_sectohz(1));
}
}
/*
@@ -9949,11 +9949,11 @@
}
/* Start the global timer */
if (xfer_timer_id) {
ohcip->ohci_timer_id = timeout(ohci_xfer_timeout_handler,
- (void *)ohcip, drv_usectohz(1000000));
+ (void *)ohcip, drv_sectohz(1));
}
return (USB_SUCCESS);
}
@@ -10202,11 +10202,11 @@
return (rval);
}
/* Get the number of clock ticks to wait */
- sof_time_wait = drv_usectohz(OHCI_MAX_SOF_TIMEWAIT * 1000000);
+ sof_time_wait = drv_sectohz(OHCI_MAX_SOF_TIMEWAIT);
sof_wait_count = 0;
/*
* Get the current usb frame number before waiting for the
@@ -10486,11 +10486,11 @@
return;
}
(void) cv_reltimedwait(&pp->pp_xfer_cmpl_cv, &ohcip->ohci_int_mutex,
- drv_usectohz(OHCI_XFER_CMPL_TIMEWAIT * 1000000), TR_CLOCK_TICK);
+ drv_sectohz(OHCI_XFER_CMPL_TIMEWAIT), TR_CLOCK_TICK);
if (pp->pp_count_done_tds) {
USB_DPRINTF_L2(PRINT_MASK_LISTS, ohcip->ohci_log_hdl,
"ohci_wait_for_transfers_completion: No transfers "