Print this page
XXXX introduce drv_sectohz


 257 
 258 /*
 259  * ehci_wait_for_transfers_completion:
 260  *
 261  * Wait for processing all completed transfers and to send results
 262  * to upstream.
 263  */
 264 static void
 265 ehci_wait_for_isoc_completion(
 266         ehci_state_t            *ehcip,
 267         ehci_pipe_private_t     *pp)
 268 {
 269         ASSERT(mutex_owned(&ehcip->ehci_int_mutex));
 270 
 271         if (pp->pp_itw_head == NULL) {
 272 
 273                 return;
 274         }
 275 
 276         (void) cv_reltimedwait(&pp->pp_xfer_cmpl_cv, &ehcip->ehci_int_mutex,
 277             drv_usectohz(EHCI_XFER_CMPL_TIMEWAIT * 1000000), TR_CLOCK_TICK);
 278 
 279         if (pp->pp_itw_head) {
 280                 USB_DPRINTF_L2(PRINT_MASK_LISTS, ehcip->ehci_log_hdl,
 281                     "ehci_wait_for_isoc_completion: "
 282                     "No transfers completion confirmation received");
 283         }
 284 }
 285 
 286 
 287 /*
 288  *  Isochronous request functions
 289  */
 290 /*
 291  * ehci_allocate_isoc_resources:
 292  *
 293  * Calculates the number of tds necessary for a isoch transfer, and
 294  * allocates all the necessary resources.
 295  *
 296  * Returns NULL if there is insufficient resources otherwise ITW.
 297  */




 257 
 258 /*
 259  * ehci_wait_for_transfers_completion:
 260  *
 261  * Wait for processing all completed transfers and to send results
 262  * to upstream.
 263  */
 264 static void
 265 ehci_wait_for_isoc_completion(
 266         ehci_state_t            *ehcip,
 267         ehci_pipe_private_t     *pp)
 268 {
 269         ASSERT(mutex_owned(&ehcip->ehci_int_mutex));
 270 
 271         if (pp->pp_itw_head == NULL) {
 272 
 273                 return;
 274         }
 275 
 276         (void) cv_reltimedwait(&pp->pp_xfer_cmpl_cv, &ehcip->ehci_int_mutex,
 277             drv_sectohz(EHCI_XFER_CMPL_TIMEWAIT), TR_CLOCK_TICK);
 278 
 279         if (pp->pp_itw_head) {
 280                 USB_DPRINTF_L2(PRINT_MASK_LISTS, ehcip->ehci_log_hdl,
 281                     "ehci_wait_for_isoc_completion: "
 282                     "No transfers completion confirmation received");
 283         }
 284 }
 285 
 286 
 287 /*
 288  *  Isochronous request functions
 289  */
 290 /*
 291  * ehci_allocate_isoc_resources:
 292  *
 293  * Calculates the number of tds necessary for a isoch transfer, and
 294  * allocates all the necessary resources.
 295  *
 296  * Returns NULL if there is insufficient resources otherwise ITW.
 297  */