Lines Matching defs:itw

69 	ehci_isoc_xwrapper_t	*itw,
74 ehci_isoc_xwrapper_t *itw,
79 ehci_isoc_xwrapper_t *itw,
89 ehci_isoc_xwrapper_t *itw,
104 ehci_isoc_xwrapper_t *itw,
109 ehci_isoc_xwrapper_t *itw,
115 ehci_isoc_xwrapper_t *itw,
120 ehci_isoc_xwrapper_t *itw,
145 ehci_isoc_xwrapper_t *itw;
163 itw = (ehci_isoc_xwrapper_t *)
168 pp = itw->itw_pipe_private;
170 ehci_deallocate_itd(ehcip, itw, itd);
171 ehci_deallocate_itw(ehcip, pp, itw);
311 ehci_isoc_xwrapper_t *itw;
402 /* Allocate the itw for this request */
403 if ((itw = ehci_allocate_itw_resources(ehcip, pp, itw_xfer_size,
409 itw->itw_handle_callback_value = NULL;
412 if (ehci_allocate_isoc_in_resource(ehcip, pp, itw, usb_flags) !=
415 ehci_deallocate_itw(ehcip, pp, itw);
420 if (itw->itw_length) {
425 itw->itw_buf, itw->itw_length);
427 Sync_IO_Buffer_for_device(itw->itw_dmahandle,
428 itw->itw_length);
430 itw->itw_curr_xfer_reqp = isoc_reqp;
433 return (itw);
447 ehci_isoc_xwrapper_t *itw,
455 usb_flags, itw->itw_port_status);
459 ASSERT(itw->itw_curr_xfer_reqp != NULL);
460 ASSERT(itw->itw_curr_xfer_reqp->isoc_pkt_descr != NULL);
465 itw->itw_curr_isoc_pktp = itw->itw_curr_xfer_reqp->isoc_pkt_descr;
467 if (itw->itw_port_status == USBA_HIGH_SPEED_DEV) {
468 error = ehci_insert_itd_req(ehcip, pp, itw, usb_flags);
470 error = ehci_insert_sitd_req(ehcip, pp, itw, usb_flags);
474 error = ehci_insert_isoc_to_pfl(ehcip, pp, itw);
481 new_itd = itw->itw_itd_head;
485 ehci_deallocate_itd(ehcip, itw, new_itd);
488 if ((itw->itw_direction == USB_EP_DIR_IN)) {
489 ehci_deallocate_isoc_in_resource(ehcip, pp, itw);
509 itw->itw_num_itds = 0;
510 itw->itw_length = 0;
517 itw->itw_curr_isoc_pktp = itw->itw_curr_xfer_reqp->isoc_pkt_descr;
536 ehci_isoc_xwrapper_t *itw,
556 curr_isoc_reqp = (usb_isoc_req_t *)itw->itw_curr_xfer_reqp;
558 page = itw->itw_cookie.dmac_address;
563 " pagesize = 0x%lx", (void *)itw->itw_curr_xfer_reqp, page,
564 itw->itw_cookie.dmac_size);
573 new_itd = itw->itw_itd_free_list;
577 itw->itw_itd_free_list = ehci_itd_iommu_to_cpu(ehcip,
596 curr_isoc_pkt_descr = itw->itw_curr_isoc_pktp;
639 itw->itw_curr_isoc_pktp++;
657 buf[0] |= (itw->itw_endpoint_num << 8);
658 buf[0] |= itw->itw_device_addr;
662 if (itw->itw_direction == USB_EP_DIR_IN) {
679 * Add this itd to the itw before we add it in the PFL
682 ehci_insert_itd_on_itw(ehcip, itw, new_itd);
700 ehci_isoc_xwrapper_t *itw,
718 curr_isoc_reqp = (usb_isoc_req_t *)itw->itw_curr_xfer_reqp;
722 if (itw->itw_direction == USB_EP_DIR_IN) {
728 ctrl |= (itw->itw_hub_port << EHCI_SITD_CTRL_PORT_SHIFT) &
730 ctrl |= (itw->itw_hub_addr << EHCI_SITD_CTRL_HUB_SHIFT) &
732 ctrl |= (itw->itw_endpoint_num << EHCI_SITD_CTRL_END_PT_SHIFT) &
734 ctrl |= (itw->itw_device_addr << EHCI_SITD_CTRL_DEVICE_SHIFT) &
745 page0 = itw->itw_cookie.dmac_address;
754 itw->itw_num_itds = curr_isoc_reqp->isoc_pkts_count;
758 count < itw->itw_num_itds; count++) {
760 curr_isoc_pkt_descr = itw->itw_curr_isoc_pktp;
769 if (itw->itw_direction == USB_EP_DIR_IN) {
783 if (count == (itw->itw_num_itds - 1)) {
801 new_sitd = itw->itw_itd_free_list;
805 itw->itw_itd_free_list = ehci_itd_iommu_to_cpu(ehcip,
821 * Add this itd to the itw before we add it in the PFL
824 ehci_insert_itd_on_itw(ehcip, itw, new_sitd);
826 itw->itw_curr_isoc_pktp++;
855 "ehci_remove_isoc_itds: itw = 0x%p num itds = %d",
912 "ehci_mark_reclaim_isoc: itw = 0x%p num itds = %d",
975 ehci_isoc_xwrapper_t *itw,
989 if ((--itw->itw_num_itds == 0) && (itw->itw_curr_xfer_reqp)) {
990 if (itw->itw_direction == USB_EP_DIR_IN) {
994 ehci_deallocate_isoc_in_resource(ehcip, pp, itw);
996 ehci_hcdi_isoc_callback(pp->pp_pipe_handle, itw,
1002 ehci_deallocate_itd(ehcip, itw, itd);
1019 ehci_isoc_xwrapper_t *itw_list, *itw;
1030 itw = ehci_allocate_isoc_resources(ehcip, ph, NULL, flags);
1031 if (itw == NULL) {
1034 itw = itw_list;
1035 while (itw != NULL) {
1036 itw_list = itw->itw_next;
1038 ehcip, pp, itw);
1039 ehci_deallocate_itw(ehcip, pp, itw);
1040 itw = itw_list;
1046 itw_list = itw;
1055 "ehci_start_isoc_polling: max = %d curr = %d itw = %p:",
1059 itw = itw_list;
1060 itw_list = itw->itw_next;
1062 error = ehci_insert_isoc_req(ehcip, pp, itw, flags);
1071 itw = itw_list;
1072 while (itw != NULL) {
1073 itw_list = itw->itw_next;
1075 ehcip, pp, itw);
1076 ehci_deallocate_itw(ehcip, pp, itw);
1077 itw = itw_list;
1174 "pp = 0x%p itw = 0x%p itd = 0x%p next_itd = 0x%p",
1184 ehci_isoc_xwrapper_t *itw,
1195 pp = itw->itw_pipe_private;
1197 ehci_handle_itd(ehcip, pp, itw, itd, itw->itw_handle_callback_value);
1212 ehci_isoc_xwrapper_t *itw,
1218 (usb_isoc_req_t *)itw->itw_curr_xfer_reqp;
1223 "ehci_handle_itd: pp=0x%p itw=0x%p itd=0x%p "
1224 "isoc_reqp=0%p data=0x%p", (void *)pp, (void *)itw, (void *)itd,
1227 if (itw->itw_port_status == USBA_HIGH_SPEED_DEV &&
1250 if (--itw->itw_num_itds != 0) {
1252 ehci_deallocate_itd(ehcip, itw, itd);
1261 if (itw->itw_direction == USB_EP_DIR_OUT) {
1267 ehci_hcdi_isoc_callback(ph, itw, USB_CR_OK);
1270 ehci_deallocate_itd(ehcip, itw, itd);
1283 ehci_sendup_itd_message(ehcip, pp, itw, itd, USB_CR_OK);
1286 ehci_deallocate_itd(ehcip, itw, itd);
1297 if ((error = ehci_allocate_isoc_in_resource(ehcip, pp, itw, 0)) ==
1299 curr_isoc_reqp = (usb_isoc_req_t *)itw->itw_curr_xfer_reqp;
1303 itw->itw_num_itds = ehci_calc_num_itds(itw,
1306 if (ehci_allocate_itds_for_itw(ehcip, itw, itw->itw_num_itds) !=
1308 ehci_deallocate_isoc_in_resource(ehcip, pp, itw);
1309 itw->itw_num_itds = 0;
1315 (ehci_insert_isoc_req(ehcip, pp, itw, 0) != USB_SUCCESS)) {
1343 ehci_isoc_xwrapper_t *itw,
1347 usb_isoc_req_t *isoc_reqp = itw->itw_curr_xfer_reqp;
1358 ASSERT(itw != NULL);
1360 length = itw->itw_length;
1363 buf = (uchar_t *)itw->itw_buf;
1375 Sync_IO_Buffer(itw->itw_dmahandle, length);
1378 ddi_rep_get8(itw->itw_accesshandle,
1388 ehci_hcdi_isoc_callback(ph, itw, error);
1400 ehci_isoc_xwrapper_t *itw,
1410 "ehci_hcdi_isoc_callback: ph = 0x%p, itw = 0x%p, cr = 0x%x",
1411 (void *)ph, (void *)itw, completion_reason);
1432 if (itw && itw->itw_curr_xfer_reqp) {
1433 curr_xfer_reqp = (usb_opaque_t)itw->itw_curr_xfer_reqp;
1434 itw->itw_curr_xfer_reqp = NULL;