Lines Matching defs:qtd
500 * completed, just move QH to inactive schedule until new QTD arrives.
501 * On new QTD, the QH moved back to 'ready' schedule, starting frame and
539 struct dwc2_qtd *qtd,
547 frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index_last];
554 dma_desc->buf = (u32)(DMAADDR(qtd->urb->usbdma, frame_desc->offset));
562 qtd->isoc_frame_index_last++;
566 if (qtd->isoc_frame_index_last == qtd->urb->packet_count)
579 struct dwc2_qtd *qtd;
618 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) {
619 if (qtd->in_process &&
620 qtd->isoc_frame_index_last ==
621 qtd->urb->packet_count)
624 qtd->isoc_td_first = idx;
625 while (qh->ntd < ntd_max && qtd->isoc_frame_index_last <
626 qtd->urb->packet_count) {
627 dwc2_fill_host_isoc_dma_desc(hsotg, qtd, qh,
632 qtd->isoc_td_last = idx;
633 qtd->in_process = 1;
659 * Move IOC "up". Required even if there is only one QTD
662 * Actually more than one QTD might be in the list if this
686 struct dwc2_qtd *qtd, struct dwc2_qh *qh,
713 qtd->control_phase == DWC2_CONTROL_SETUP)
738 struct dwc2_qtd *qtd;
748 * to the buffer of the currently processed QTD. For non-SG request
749 * there is always one QTD active.
752 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry) {
753 dev_vdbg(hsotg->dev, "qtd=%p\n", qtd);
756 /* SG request - more than 1 QTD */
757 chan->xfer_dma = DMAADDR(qtd->urb->usbdma,
758 qtd->urb->actual_length);
759 chan->xfer_len = qtd->urb->length -
760 qtd->urb->actual_length;
765 qtd->n_desc = 0;
779 dwc2_fill_host_dma_desc(hsotg, chan, qtd, qh, n_desc);
785 qtd->n_desc++;
791 qtd->in_process = 1;
885 struct dwc2_qtd *qtd,
893 if (!qtd->urb)
903 frame_desc = &qtd->urb->iso_descs[qtd->isoc_frame_index_last];
904 dma_desc->buf = (u32)(DMAADDR(qtd->urb->usbdma, frame_desc->offset));
915 qtd->urb->error_count++;
924 if (++qtd->isoc_frame_index == qtd->urb->packet_count) {
929 dwc2_host_complete(hsotg, qtd, 0);
930 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh);
957 struct dwc2_qtd *qtd, *qtd_tmp;
966 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry)
967 qtd->in_process = 0;
985 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list,
987 if (qtd->urb) {
988 for (idx = 0; idx < qtd->urb->packet_count;
990 frame_desc = &qtd->urb->iso_descs[idx];
994 dwc2_host_complete(hsotg, qtd, err);
997 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh);
1003 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) {
1004 if (!qtd->in_process)
1009 * qtd was added. In fact, during isoc desc init, dwc2 may skip
1012 if (idx != qtd->isoc_td_first) {
1015 idx, qtd->isoc_td_first);
1016 idx = qtd->isoc_td_first;
1023 rc = dwc2_cmpl_host_isoc_dma_desc(hsotg, chan, qtd, qh,
1058 struct dwc2_qtd *qtd,
1063 struct dwc2_hcd_urb *urb = qtd->urb;
1109 if (qtd->control_phase == DWC2_CONTROL_DATA) {
1119 } else if (qtd->control_phase == DWC2_CONTROL_STATUS) {
1140 int chnum, struct dwc2_qtd *qtd,
1146 struct dwc2_hcd_urb *urb = qtd->urb;
1164 "qtd=%p dwc2_urb=%p desc_num=%d desc=%p n_bytes=%d\n",
1165 qtd, urb, desc_num, dma_desc, n_bytes);
1166 failed = dwc2_update_non_isoc_urb_state_ddma(hsotg, chan, qtd, dma_desc,
1173 dwc2_host_complete(hsotg, qtd, urb->status);
1174 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh);
1181 switch (qtd->control_phase) {
1184 qtd->control_phase = DWC2_CONTROL_DATA;
1186 qtd->control_phase = DWC2_CONTROL_STATUS;
1192 qtd->control_phase = DWC2_CONTROL_STATUS;
1195 } else if (desc_num + 1 == qtd->n_desc) {
1201 qtd);
1219 struct dwc2_qtd *qtd = NULL;
1224 list_for_each_entry(qtd, &qh->qtd_list, qtd_list_entry)
1225 qtd->in_process = 0;
1232 qtd = list_entry(qtd_item, struct dwc2_qtd, qtd_list_entry);
1235 for (i = 0; i < qtd->n_desc; i++) {
1236 if (dwc2_process_non_isoc_desc(hsotg, chan, chnum, qtd,
1239 qtd = NULL;
1253 else if (qtd)
1254 dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
1282 * the session, i.e. QTD list is empty.
1300 struct dwc2_qtd *qtd, *qtd_tmp;
1306 list_for_each_entry_safe(qtd, qtd_tmp,
1309 dwc2_host_complete(hsotg, qtd,
1312 qtd, qh);