Lines Matching defs:itw

67 	ehci_isoc_xwrapper_t	*itw);
71 ehci_isoc_xwrapper_t *itw);
80 ehci_isoc_xwrapper_t *itw,
83 ehci_isoc_xwrapper_t *itw,
87 ehci_isoc_xwrapper_t *itw,
91 ehci_isoc_xwrapper_t *itw);
94 ehci_isoc_xwrapper_t *itw,
107 ehci_isoc_xwrapper_t *itw);
124 ehci_isoc_xwrapper_t *itw);
141 ehci_isoc_xwrapper_t *itw,
145 ehci_isoc_xwrapper_t *itw,
149 ehci_isoc_xwrapper_t *itw,
301 ehci_isoc_xwrapper_t *itw;
303 itw = ehci_allocate_itw(ehcip, pp, itw_length, usb_flags);
305 if (itw == NULL) {
309 itd_count = ehci_calc_num_itds(itw, pkt_count);
313 if (ehci_allocate_itds_for_itw(ehcip, itw, itd_count) ==
315 itw->itw_num_itds = itd_count;
317 ehci_deallocate_itw(ehcip, pp, itw);
318 itw = NULL;
322 return (itw);
329 * Creates a Isochronous Transfer Wrapper (itw) and populate it with this
357 ehci_isoc_xwrapper_t *itw;
366 itw = kmem_zalloc(sizeof (ehci_isoc_xwrapper_t), KM_NOSLEEP);
368 if (itw == NULL) {
382 &itw->itw_dmahandle);
388 kmem_free(itw, sizeof (ehci_isoc_xwrapper_t));
399 result = ddi_dma_mem_alloc(itw->itw_dmahandle,
405 (caddr_t *)&itw->itw_buf,
407 &itw->itw_accesshandle);
413 ddi_dma_free_handle(&itw->itw_dmahandle);
414 kmem_free(itw, sizeof (ehci_isoc_xwrapper_t));
422 result = ddi_dma_addr_bind_handle(itw->itw_dmahandle,
424 (caddr_t)itw->itw_buf,
429 &itw->itw_cookie,
438 result = ddi_dma_unbind_handle(itw->itw_dmahandle);
441 ddi_dma_mem_free(&itw->itw_accesshandle);
442 ddi_dma_free_handle(&itw->itw_dmahandle);
443 kmem_free(itw, sizeof (ehci_isoc_xwrapper_t));
450 ddi_dma_mem_free(&itw->itw_accesshandle);
451 ddi_dma_free_handle(&itw->itw_dmahandle);
452 kmem_free(itw, sizeof (ehci_isoc_xwrapper_t));
458 itw->itw_pipe_private = pp;
460 pp->pp_itw_head = itw;
461 pp->pp_itw_tail = itw;
463 pp->pp_itw_tail->itw_next = itw;
464 pp->pp_itw_tail = itw;
471 itw->itw_length = length;
472 itw->itw_flags = usb_flags;
473 itw->itw_port_status = usba_device->usb_port_status;
474 itw->itw_direction = endpoint->bEndpointAddress & USB_EP_DIR_MASK;
481 itw->itw_hub_addr = usba_device->usb_hs_hub_addr;
482 itw->itw_hub_port = usba_device->usb_hs_hub_port;
483 itw->itw_endpoint_num = endpoint->bEndpointAddress & USB_EP_NUM_MASK;
484 itw->itw_device_addr = usba_device->usb_addr;
488 itw->itw_id = EHCI_GET_ID((void *)itw);
489 ASSERT(itw->itw_id != NULL);
492 "ehci_create_itw: itw = 0x%p real_length = 0x%lx",
493 (void *)itw, real_length);
498 return (itw);
512 ehci_isoc_xwrapper_t *itw)
517 "ehci_deallocate_itw: itw = 0x%p", (void *)itw);
524 if (itw->itw_itd_head) {
525 ASSERT(itw->itw_itd_tail != NULL);
530 ASSERT(itw->itw_itd_tail == NULL);
533 ehci_deallocate_itds_for_itw(ehcip, itw);
541 if (pp->pp_itw_head == itw) {
542 if (pp->pp_itw_tail == itw) {
546 pp->pp_itw_head = itw->itw_next;
552 while (next && (next != itw)) {
557 if (next == itw) {
560 if (pp->pp_itw_tail == itw) {
567 ehci_free_itw_dma(ehcip, pp, itw);
584 ehci_isoc_xwrapper_t *itw)
589 "ehci_free_itw_dma: itw = 0x%p", (void *)itw);
591 ASSERT(itw != NULL);
592 ASSERT(itw->itw_id != NULL);
595 EHCI_FREE_ID((uint32_t)itw->itw_id);
597 rval = ddi_dma_unbind_handle(itw->itw_dmahandle);
600 ddi_dma_mem_free(&itw->itw_accesshandle);
601 ddi_dma_free_handle(&itw->itw_dmahandle);
604 kmem_free(itw, sizeof (ehci_isoc_xwrapper_t));
667 ehci_isoc_xwrapper_t *itw,
685 /* Remove the itd from the itw */
686 itd = itw->itw_itd_head;
700 itw->itw_itd_tail = itd;
703 itw->itw_itd_head = ehci_itd_iommu_to_cpu(
706 if (itw->itw_itd_head == NULL) {
707 itw->itw_itd_tail = NULL;
731 ehci_isoc_xwrapper_t *itw,
737 if (itw->itw_port_status == USBA_HIGH_SPEED_DEV) {
763 ehci_isoc_xwrapper_t *itw,
783 itw->itw_itd_free_list);
794 itw->itw_itd_free_list = itd;
810 ehci_isoc_xwrapper_t *itw)
816 "ehci_free_itw_itd_resources: itw = 0x%p", (void *)itw);
818 itd = itw->itw_itd_free_list;
823 ehci_deallocate_itd(ehcip, itw, itd);
826 itw->itw_itd_free_list = NULL;
838 ehci_isoc_xwrapper_t *itw,
847 if (itw->itw_itd_head == NULL) {
848 ASSERT(itw->itw_itd_tail == NULL);
849 itw->itw_itd_head = itd;
850 itw->itw_itd_tail = itd;
852 ehci_itd_t *dummy = (ehci_itd_t *)itw->itw_itd_tail;
861 itw->itw_itd_tail = itd;
864 Set_ITD(itd->itd_trans_wrapper, (uint32_t)itw->itw_id);
1024 ehci_isoc_xwrapper_t *itw)
1026 usb_isoc_req_t *isoc_reqp = itw->itw_curr_xfer_reqp;
1036 "isoc flags 0x%x itw = 0x%p",
1037 isoc_reqp->isoc_attributes, (void *)itw);
1118 if (itw->itw_port_status == USBA_HIGH_SPEED_DEV) {
1124 itd = itw->itw_itd_head;
1159 (unsigned long long)start_frame_number, itw->itw_num_itds);
1276 ehci_isoc_xwrapper_t *itw,
1284 "pp = 0x%p itw = 0x%p flags = 0x%x", (void *)pp, (void *)itw,
1288 ASSERT(itw->itw_curr_xfer_reqp == NULL);
1311 itw->itw_curr_xfer_reqp = orig_isoc_reqp;
1334 ehci_isoc_xwrapper_t *itw)
1343 "pp = 0x%p itw = 0x%p", (void *)pp, (void *)itw);
1348 isoc_reqp = itw->itw_curr_xfer_reqp;
1352 itw->itw_curr_xfer_reqp = NULL;
1353 itw->itw_curr_isoc_pktp = NULL;
1441 ehci_isoc_xwrapper_t *itw,
1449 isoc_reqp = itw->itw_curr_xfer_reqp;
1451 if (itw->itw_port_status == USBA_HIGH_SPEED_DEV) {
1452 error = ehci_parse_itd_error(ehcip, itw, itd);
1454 error = ehci_parse_sitd_error(ehcip, itw, itd);
1461 " Endpoint number %d", error, itw->itw_device_addr,
1462 itw->itw_endpoint_num);
1472 ehci_isoc_xwrapper_t *itw,
1480 isoc_reqp = itw->itw_curr_xfer_reqp;
1495 if (itw->itw_direction == USB_EP_DIR_OUT) {
1531 itw->itw_curr_isoc_pktp->isoc_pkt_actual_length = 0;
1534 itw->itw_curr_isoc_pktp->isoc_pkt_status = error;
1541 "Endpoint number %d", error, itw->itw_device_addr,
1542 itw->itw_endpoint_num);
1545 itw->itw_curr_isoc_pktp++;
1553 ehci_isoc_xwrapper_t *itw,
1561 isoc_pkt_descr = itw->itw_curr_isoc_pktp;
1581 if (itw->itw_direction == USB_EP_DIR_OUT) {
1633 itw->itw_curr_isoc_pktp++;