Lines Matching refs:qtd

542 					 struct dwc2_qtd *qtd,  in dwc2_fill_host_isoc_dma_desc()  argument
550 frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index_last]; in dwc2_fill_host_isoc_dma_desc()
557 dma_desc->buf = (u32)(qtd->urb->dma + frame_desc->offset); in dwc2_fill_host_isoc_dma_desc()
565 qtd->isoc_frame_index_last++; in dwc2_fill_host_isoc_dma_desc()
569 if (qtd->isoc_frame_index_last == qtd->urb->packet_count) in dwc2_fill_host_isoc_dma_desc()
583 struct dwc2_qtd *qtd; in dwc2_init_isoc_dma_desc() local
622 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) { in dwc2_init_isoc_dma_desc()
623 if (qtd->in_process && in dwc2_init_isoc_dma_desc()
624 qtd->isoc_frame_index_last == in dwc2_init_isoc_dma_desc()
625 qtd->urb->packet_count) in dwc2_init_isoc_dma_desc()
628 qtd->isoc_td_first = idx; in dwc2_init_isoc_dma_desc()
629 while (qh->ntd < ntd_max && qtd->isoc_frame_index_last < in dwc2_init_isoc_dma_desc()
630 qtd->urb->packet_count) { in dwc2_init_isoc_dma_desc()
631 dwc2_fill_host_isoc_dma_desc(hsotg, qtd, qh, in dwc2_init_isoc_dma_desc()
636 qtd->isoc_td_last = idx; in dwc2_init_isoc_dma_desc()
637 qtd->in_process = 1; in dwc2_init_isoc_dma_desc()
691 struct dwc2_qtd *qtd, struct dwc2_qh *qh, in dwc2_fill_host_dma_desc() argument
718 qtd->control_phase == DWC2_CONTROL_SETUP) in dwc2_fill_host_dma_desc()
744 struct dwc2_qtd *qtd; in dwc2_init_non_isoc_dma_desc() local
758 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) { in dwc2_init_non_isoc_dma_desc()
759 dev_vdbg(hsotg->dev, "qtd=%p\n", qtd); in dwc2_init_non_isoc_dma_desc()
763 chan->xfer_dma = qtd->urb->dma + in dwc2_init_non_isoc_dma_desc()
764 qtd->urb->actual_length; in dwc2_init_non_isoc_dma_desc()
765 chan->xfer_len = qtd->urb->length - in dwc2_init_non_isoc_dma_desc()
766 qtd->urb->actual_length; in dwc2_init_non_isoc_dma_desc()
771 qtd->n_desc = 0; in dwc2_init_non_isoc_dma_desc()
786 dwc2_fill_host_dma_desc(hsotg, chan, qtd, qh, n_desc); in dwc2_init_non_isoc_dma_desc()
792 qtd->n_desc++; in dwc2_init_non_isoc_dma_desc()
798 qtd->in_process = 1; in dwc2_init_non_isoc_dma_desc()
894 struct dwc2_qtd *qtd, in dwc2_cmpl_host_isoc_dma_desc() argument
902 if (!qtd->urb) in dwc2_cmpl_host_isoc_dma_desc()
912 frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index_last]; in dwc2_cmpl_host_isoc_dma_desc()
913 dma_desc->buf = (u32)(qtd->urb->dma + frame_desc->offset); in dwc2_cmpl_host_isoc_dma_desc()
924 qtd->urb->error_count++; in dwc2_cmpl_host_isoc_dma_desc()
933 if (++qtd->isoc_frame_index == qtd->urb->packet_count) { in dwc2_cmpl_host_isoc_dma_desc()
938 dwc2_host_complete(hsotg, qtd, 0); in dwc2_cmpl_host_isoc_dma_desc()
939 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_cmpl_host_isoc_dma_desc()
966 struct dwc2_qtd *qtd, *qtd_tmp; in dwc2_complete_isoc_xfer_ddma() local
975 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) in dwc2_complete_isoc_xfer_ddma()
976 qtd->in_process = 0; in dwc2_complete_isoc_xfer_ddma()
994 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_complete_isoc_xfer_ddma()
996 if (qtd->urb) { in dwc2_complete_isoc_xfer_ddma()
997 for (idx = 0; idx < qtd->urb->packet_count; in dwc2_complete_isoc_xfer_ddma()
999 frame_desc = &qtd->urb->iso_descs[idx]; in dwc2_complete_isoc_xfer_ddma()
1003 dwc2_host_complete(hsotg, qtd, err); in dwc2_complete_isoc_xfer_ddma()
1006 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_complete_isoc_xfer_ddma()
1012 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) { in dwc2_complete_isoc_xfer_ddma()
1013 if (!qtd->in_process) in dwc2_complete_isoc_xfer_ddma()
1021 if (idx != qtd->isoc_td_first) { in dwc2_complete_isoc_xfer_ddma()
1024 idx, qtd->isoc_td_first); in dwc2_complete_isoc_xfer_ddma()
1025 idx = qtd->isoc_td_first; in dwc2_complete_isoc_xfer_ddma()
1032 rc = dwc2_cmpl_host_isoc_dma_desc(hsotg, chan, qtd, qh, in dwc2_complete_isoc_xfer_ddma()
1069 struct dwc2_qtd *qtd, in dwc2_update_non_isoc_urb_state_ddma() argument
1074 struct dwc2_hcd_urb *urb = qtd->urb; in dwc2_update_non_isoc_urb_state_ddma()
1120 if (qtd->control_phase == DWC2_CONTROL_DATA) { in dwc2_update_non_isoc_urb_state_ddma()
1130 } else if (qtd->control_phase == DWC2_CONTROL_STATUS) { in dwc2_update_non_isoc_urb_state_ddma()
1151 int chnum, struct dwc2_qtd *qtd, in dwc2_process_non_isoc_desc() argument
1157 struct dwc2_hcd_urb *urb = qtd->urb; in dwc2_process_non_isoc_desc()
1177 qtd, urb, desc_num, dma_desc, n_bytes); in dwc2_process_non_isoc_desc()
1178 failed = dwc2_update_non_isoc_urb_state_ddma(hsotg, chan, qtd, dma_desc, in dwc2_process_non_isoc_desc()
1182 dwc2_host_complete(hsotg, qtd, urb->status); in dwc2_process_non_isoc_desc()
1183 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_process_non_isoc_desc()
1190 switch (qtd->control_phase) { in dwc2_process_non_isoc_desc()
1193 qtd->control_phase = DWC2_CONTROL_DATA; in dwc2_process_non_isoc_desc()
1195 qtd->control_phase = DWC2_CONTROL_STATUS; in dwc2_process_non_isoc_desc()
1201 qtd->control_phase = DWC2_CONTROL_STATUS; in dwc2_process_non_isoc_desc()
1204 } else if (desc_num + 1 == qtd->n_desc) { in dwc2_process_non_isoc_desc()
1210 qtd); in dwc2_process_non_isoc_desc()
1228 struct dwc2_qtd *qtd = NULL; in dwc2_complete_non_isoc_xfer_ddma() local
1233 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) in dwc2_complete_non_isoc_xfer_ddma()
1234 qtd->in_process = 0; in dwc2_complete_non_isoc_xfer_ddma()
1242 qtd = list_entry(qtd_item, struct dwc2_qtd, qtd_list_entry); in dwc2_complete_non_isoc_xfer_ddma()
1244 qtd_desc_count = qtd->n_desc; in dwc2_complete_non_isoc_xfer_ddma()
1247 if (dwc2_process_non_isoc_desc(hsotg, chan, chnum, qtd, in dwc2_complete_non_isoc_xfer_ddma()
1250 qtd = NULL; in dwc2_complete_non_isoc_xfer_ddma()
1313 struct dwc2_qtd *qtd, *qtd_tmp; in dwc2_hcd_complete_xfer_ddma() local
1319 list_for_each_entry_safe(qtd, qtd_tmp, in dwc2_hcd_complete_xfer_ddma()
1322 dwc2_host_complete(hsotg, qtd, in dwc2_hcd_complete_xfer_ddma()
1325 qtd, qh); in dwc2_hcd_complete_xfer_ddma()