Lines Matching refs:qtd

512 					 struct dwc2_qtd *qtd,  in dwc2_fill_host_isoc_dma_desc()  argument
520 frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index_last]; in dwc2_fill_host_isoc_dma_desc()
527 dma_desc->buf = (u32)(qtd->urb->dma + frame_desc->offset); in dwc2_fill_host_isoc_dma_desc()
535 qtd->isoc_frame_index_last++; in dwc2_fill_host_isoc_dma_desc()
539 if (qtd->isoc_frame_index_last == qtd->urb->packet_count) in dwc2_fill_host_isoc_dma_desc()
553 struct dwc2_qtd *qtd; in dwc2_init_isoc_dma_desc() local
592 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) { in dwc2_init_isoc_dma_desc()
593 if (qtd->in_process && in dwc2_init_isoc_dma_desc()
594 qtd->isoc_frame_index_last == in dwc2_init_isoc_dma_desc()
595 qtd->urb->packet_count) in dwc2_init_isoc_dma_desc()
598 qtd->isoc_td_first = idx; in dwc2_init_isoc_dma_desc()
599 while (qh->ntd < ntd_max && qtd->isoc_frame_index_last < in dwc2_init_isoc_dma_desc()
600 qtd->urb->packet_count) { in dwc2_init_isoc_dma_desc()
601 dwc2_fill_host_isoc_dma_desc(hsotg, qtd, qh, in dwc2_init_isoc_dma_desc()
606 qtd->isoc_td_last = idx; in dwc2_init_isoc_dma_desc()
607 qtd->in_process = 1; in dwc2_init_isoc_dma_desc()
661 struct dwc2_qtd *qtd, struct dwc2_qh *qh, in dwc2_fill_host_dma_desc() argument
688 qtd->control_phase == DWC2_CONTROL_SETUP) in dwc2_fill_host_dma_desc()
714 struct dwc2_qtd *qtd; in dwc2_init_non_isoc_dma_desc() local
728 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) { in dwc2_init_non_isoc_dma_desc()
729 dev_vdbg(hsotg->dev, "qtd=%p\n", qtd); in dwc2_init_non_isoc_dma_desc()
733 chan->xfer_dma = qtd->urb->dma + in dwc2_init_non_isoc_dma_desc()
734 qtd->urb->actual_length; in dwc2_init_non_isoc_dma_desc()
735 chan->xfer_len = qtd->urb->length - in dwc2_init_non_isoc_dma_desc()
736 qtd->urb->actual_length; in dwc2_init_non_isoc_dma_desc()
741 qtd->n_desc = 0; in dwc2_init_non_isoc_dma_desc()
756 dwc2_fill_host_dma_desc(hsotg, chan, qtd, qh, n_desc); in dwc2_init_non_isoc_dma_desc()
762 qtd->n_desc++; in dwc2_init_non_isoc_dma_desc()
768 qtd->in_process = 1; in dwc2_init_non_isoc_dma_desc()
864 struct dwc2_qtd *qtd, in dwc2_cmpl_host_isoc_dma_desc() argument
874 if (!qtd->urb) in dwc2_cmpl_host_isoc_dma_desc()
877 usb_urb = qtd->urb->priv; in dwc2_cmpl_host_isoc_dma_desc()
885 frame_desc_idx = (idx - qtd->isoc_td_first) & (usb_urb->number_of_packets - 1); in dwc2_cmpl_host_isoc_dma_desc()
887 frame_desc = &qtd->urb->iso_descs[frame_desc_idx]; in dwc2_cmpl_host_isoc_dma_desc()
888 if (idx == qtd->isoc_td_first) in dwc2_cmpl_host_isoc_dma_desc()
890 dma_desc->buf = (u32)(qtd->urb->dma + frame_desc->offset); in dwc2_cmpl_host_isoc_dma_desc()
901 qtd->urb->error_count++; in dwc2_cmpl_host_isoc_dma_desc()
910 if (++qtd->isoc_frame_index == usb_urb->number_of_packets) { in dwc2_cmpl_host_isoc_dma_desc()
915 dwc2_host_complete(hsotg, qtd, 0); in dwc2_cmpl_host_isoc_dma_desc()
916 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_cmpl_host_isoc_dma_desc()
943 struct dwc2_qtd *qtd, *qtd_tmp; in dwc2_complete_isoc_xfer_ddma() local
952 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) in dwc2_complete_isoc_xfer_ddma()
953 qtd->in_process = 0; in dwc2_complete_isoc_xfer_ddma()
971 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_complete_isoc_xfer_ddma()
973 if (qtd->urb) { in dwc2_complete_isoc_xfer_ddma()
974 for (idx = 0; idx < qtd->urb->packet_count; in dwc2_complete_isoc_xfer_ddma()
976 frame_desc = &qtd->urb->iso_descs[idx]; in dwc2_complete_isoc_xfer_ddma()
980 dwc2_host_complete(hsotg, qtd, err); in dwc2_complete_isoc_xfer_ddma()
983 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_complete_isoc_xfer_ddma()
989 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) { in dwc2_complete_isoc_xfer_ddma()
990 if (!qtd->in_process) in dwc2_complete_isoc_xfer_ddma()
998 if (idx != qtd->isoc_td_first) { in dwc2_complete_isoc_xfer_ddma()
1001 idx, qtd->isoc_td_first); in dwc2_complete_isoc_xfer_ddma()
1002 idx = qtd->isoc_td_first; in dwc2_complete_isoc_xfer_ddma()
1009 rc = dwc2_cmpl_host_isoc_dma_desc(hsotg, chan, qtd, qh, in dwc2_complete_isoc_xfer_ddma()
1046 struct dwc2_qtd *qtd, in dwc2_update_non_isoc_urb_state_ddma() argument
1051 struct dwc2_hcd_urb *urb = qtd->urb; in dwc2_update_non_isoc_urb_state_ddma()
1097 if (qtd->control_phase == DWC2_CONTROL_DATA) { in dwc2_update_non_isoc_urb_state_ddma()
1107 } else if (qtd->control_phase == DWC2_CONTROL_STATUS) { in dwc2_update_non_isoc_urb_state_ddma()
1128 int chnum, struct dwc2_qtd *qtd, in dwc2_process_non_isoc_desc() argument
1134 struct dwc2_hcd_urb *urb = qtd->urb; in dwc2_process_non_isoc_desc()
1154 qtd, urb, desc_num, dma_desc, n_bytes); in dwc2_process_non_isoc_desc()
1155 failed = dwc2_update_non_isoc_urb_state_ddma(hsotg, chan, qtd, dma_desc, in dwc2_process_non_isoc_desc()
1159 dwc2_host_complete(hsotg, qtd, urb->status); in dwc2_process_non_isoc_desc()
1160 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_process_non_isoc_desc()
1167 switch (qtd->control_phase) { in dwc2_process_non_isoc_desc()
1170 qtd->control_phase = DWC2_CONTROL_DATA; in dwc2_process_non_isoc_desc()
1172 qtd->control_phase = DWC2_CONTROL_STATUS; in dwc2_process_non_isoc_desc()
1178 qtd->control_phase = DWC2_CONTROL_STATUS; in dwc2_process_non_isoc_desc()
1181 } else if (desc_num + 1 == qtd->n_desc) { in dwc2_process_non_isoc_desc()
1187 qtd); in dwc2_process_non_isoc_desc()
1205 struct dwc2_qtd *qtd = NULL; in dwc2_complete_non_isoc_xfer_ddma() local
1210 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) in dwc2_complete_non_isoc_xfer_ddma()
1211 qtd->in_process = 0; in dwc2_complete_non_isoc_xfer_ddma()
1219 qtd = list_entry(qtd_item, struct dwc2_qtd, qtd_list_entry); in dwc2_complete_non_isoc_xfer_ddma()
1221 qtd_desc_count = qtd->n_desc; in dwc2_complete_non_isoc_xfer_ddma()
1224 if (dwc2_process_non_isoc_desc(hsotg, chan, chnum, qtd, in dwc2_complete_non_isoc_xfer_ddma()
1227 qtd = NULL; in dwc2_complete_non_isoc_xfer_ddma()
1290 struct dwc2_qtd *qtd, *qtd_tmp; in dwc2_hcd_complete_xfer_ddma() local
1296 list_for_each_entry_safe(qtd, qtd_tmp, in dwc2_hcd_complete_xfer_ddma()
1299 dwc2_host_complete(hsotg, qtd, in dwc2_hcd_complete_xfer_ddma()
1302 qtd, qh); in dwc2_hcd_complete_xfer_ddma()