Print this page
XXXX introduce drv_sectohz
*** 1675,1685 ****
/* 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);
/* Clear ohci_sof_flag indicating waiting for SOF interrupt */
ohcip->ohci_sof_flag = B_FALSE;
/* Enable the SOF interrupt */
--- 1675,1685 ----
/* 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_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,7520 ****
* 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));
}
}
/*
--- 7510,7520 ----
* 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_sectohz(1));
}
}
/*
*** 9949,9959 ****
}
/* Start the global timer */
if (xfer_timer_id) {
ohcip->ohci_timer_id = timeout(ohci_xfer_timeout_handler,
! (void *)ohcip, drv_usectohz(1000000));
}
return (USB_SUCCESS);
}
--- 9949,9959 ----
}
/* Start the global timer */
if (xfer_timer_id) {
ohcip->ohci_timer_id = timeout(ohci_xfer_timeout_handler,
! (void *)ohcip, drv_sectohz(1));
}
return (USB_SUCCESS);
}
*** 10202,10212 ****
return (rval);
}
/* Get the number of clock ticks to wait */
! sof_time_wait = drv_usectohz(OHCI_MAX_SOF_TIMEWAIT * 1000000);
sof_wait_count = 0;
/*
* Get the current usb frame number before waiting for the
--- 10202,10212 ----
return (rval);
}
/* Get the number of clock ticks to wait */
! sof_time_wait = drv_sectohz(OHCI_MAX_SOF_TIMEWAIT);
sof_wait_count = 0;
/*
* Get the current usb frame number before waiting for the
*** 10486,10496 ****
return;
}
(void) cv_reltimedwait(&pp->pp_xfer_cmpl_cv, &ohcip->ohci_int_mutex,
! drv_usectohz(OHCI_XFER_CMPL_TIMEWAIT * 1000000), 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 "
--- 10486,10496 ----
return;
}
(void) cv_reltimedwait(&pp->pp_xfer_cmpl_cv, &ohcip->ohci_int_mutex,
! 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 "