Lines Matching refs:qtd

508 					 struct dwc2_qtd *qtd,  in dwc2_fill_host_isoc_dma_desc()  argument
516 frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index_last]; in dwc2_fill_host_isoc_dma_desc()
523 dma_desc->buf = (u32)(qtd->urb->dma + frame_desc->offset); in dwc2_fill_host_isoc_dma_desc()
529 if (qtd->isoc_frame_index_last == qtd->urb->packet_count) in dwc2_fill_host_isoc_dma_desc()
534 qtd->isoc_frame_index_last++; in dwc2_fill_host_isoc_dma_desc()
540 struct dwc2_qtd *qtd; in dwc2_init_isoc_dma_desc() local
558 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) { in dwc2_init_isoc_dma_desc()
559 while (qh->ntd < ntd_max && qtd->isoc_frame_index_last < in dwc2_init_isoc_dma_desc()
560 qtd->urb->packet_count) { in dwc2_init_isoc_dma_desc()
563 dwc2_fill_host_isoc_dma_desc(hsotg, qtd, qh, in dwc2_init_isoc_dma_desc()
568 qtd->in_process = 1; in dwc2_init_isoc_dma_desc()
618 struct dwc2_qtd *qtd, struct dwc2_qh *qh, in dwc2_fill_host_dma_desc() argument
645 qtd->control_phase == DWC2_CONTROL_SETUP) in dwc2_fill_host_dma_desc()
665 struct dwc2_qtd *qtd; in dwc2_init_non_isoc_dma_desc() local
679 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) { in dwc2_init_non_isoc_dma_desc()
680 dev_vdbg(hsotg->dev, "qtd=%p\n", qtd); in dwc2_init_non_isoc_dma_desc()
684 chan->xfer_dma = qtd->urb->dma + in dwc2_init_non_isoc_dma_desc()
685 qtd->urb->actual_length; in dwc2_init_non_isoc_dma_desc()
686 chan->xfer_len = qtd->urb->length - in dwc2_init_non_isoc_dma_desc()
687 qtd->urb->actual_length; in dwc2_init_non_isoc_dma_desc()
692 qtd->n_desc = 0; in dwc2_init_non_isoc_dma_desc()
701 dwc2_fill_host_dma_desc(hsotg, chan, qtd, qh, n_desc); in dwc2_init_non_isoc_dma_desc()
707 qtd->n_desc++; in dwc2_init_non_isoc_dma_desc()
713 qtd->in_process = 1; in dwc2_init_non_isoc_dma_desc()
800 struct dwc2_qtd *qtd, in dwc2_cmpl_host_isoc_dma_desc() argument
808 if (!qtd->urb) in dwc2_cmpl_host_isoc_dma_desc()
811 frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index_last]; in dwc2_cmpl_host_isoc_dma_desc()
812 dma_desc->buf = (u32)(qtd->urb->dma + frame_desc->offset); in dwc2_cmpl_host_isoc_dma_desc()
823 qtd->urb->error_count++; in dwc2_cmpl_host_isoc_dma_desc()
832 if (++qtd->isoc_frame_index == qtd->urb->packet_count) { in dwc2_cmpl_host_isoc_dma_desc()
837 dwc2_host_complete(hsotg, qtd, 0); in dwc2_cmpl_host_isoc_dma_desc()
838 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_cmpl_host_isoc_dma_desc()
865 struct dwc2_qtd *qtd, *qtd_tmp; in dwc2_complete_isoc_xfer_ddma() local
874 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) in dwc2_complete_isoc_xfer_ddma()
875 qtd->in_process = 0; in dwc2_complete_isoc_xfer_ddma()
893 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_complete_isoc_xfer_ddma()
895 if (qtd->urb) { in dwc2_complete_isoc_xfer_ddma()
896 for (idx = 0; idx < qtd->urb->packet_count; in dwc2_complete_isoc_xfer_ddma()
898 frame_desc = &qtd->urb->iso_descs[idx]; in dwc2_complete_isoc_xfer_ddma()
902 dwc2_host_complete(hsotg, qtd, err); in dwc2_complete_isoc_xfer_ddma()
905 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_complete_isoc_xfer_ddma()
911 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) { in dwc2_complete_isoc_xfer_ddma()
912 if (!qtd->in_process) in dwc2_complete_isoc_xfer_ddma()
915 rc = dwc2_cmpl_host_isoc_dma_desc(hsotg, chan, qtd, qh, in dwc2_complete_isoc_xfer_ddma()
934 struct dwc2_qtd *qtd, in dwc2_update_non_isoc_urb_state_ddma() argument
939 struct dwc2_hcd_urb *urb = qtd->urb; in dwc2_update_non_isoc_urb_state_ddma()
985 if (qtd->control_phase == DWC2_CONTROL_DATA) { in dwc2_update_non_isoc_urb_state_ddma()
995 } else if (qtd->control_phase == DWC2_CONTROL_STATUS) { in dwc2_update_non_isoc_urb_state_ddma()
1016 int chnum, struct dwc2_qtd *qtd, in dwc2_process_non_isoc_desc() argument
1022 struct dwc2_hcd_urb *urb = qtd->urb; in dwc2_process_non_isoc_desc()
1036 qtd, urb, desc_num, dma_desc, n_bytes); in dwc2_process_non_isoc_desc()
1037 failed = dwc2_update_non_isoc_urb_state_ddma(hsotg, chan, qtd, dma_desc, in dwc2_process_non_isoc_desc()
1041 dwc2_host_complete(hsotg, qtd, urb->status); in dwc2_process_non_isoc_desc()
1042 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_process_non_isoc_desc()
1049 switch (qtd->control_phase) { in dwc2_process_non_isoc_desc()
1052 qtd->control_phase = DWC2_CONTROL_DATA; in dwc2_process_non_isoc_desc()
1054 qtd->control_phase = DWC2_CONTROL_STATUS; in dwc2_process_non_isoc_desc()
1060 qtd->control_phase = DWC2_CONTROL_STATUS; in dwc2_process_non_isoc_desc()
1063 } else if (desc_num + 1 == qtd->n_desc) { in dwc2_process_non_isoc_desc()
1069 qtd); in dwc2_process_non_isoc_desc()
1087 struct dwc2_qtd *qtd = NULL; in dwc2_complete_non_isoc_xfer_ddma() local
1092 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) in dwc2_complete_non_isoc_xfer_ddma()
1093 qtd->in_process = 0; in dwc2_complete_non_isoc_xfer_ddma()
1100 qtd = list_entry(qtd_item, struct dwc2_qtd, qtd_list_entry); in dwc2_complete_non_isoc_xfer_ddma()
1103 for (i = 0; i < qtd->n_desc; i++) { in dwc2_complete_non_isoc_xfer_ddma()
1104 if (dwc2_process_non_isoc_desc(hsotg, chan, chnum, qtd, in dwc2_complete_non_isoc_xfer_ddma()
1107 qtd = NULL; in dwc2_complete_non_isoc_xfer_ddma()
1121 else if (qtd) in dwc2_complete_non_isoc_xfer_ddma()
1122 dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd); in dwc2_complete_non_isoc_xfer_ddma()