Lines Matching refs:idx

60 static u16 dwc2_desclist_idx_inc(u16 idx, u16 inc, u8 speed)  in dwc2_desclist_idx_inc()  argument
62 return (idx + inc) & in dwc2_desclist_idx_inc()
67 static u16 dwc2_desclist_idx_dec(u16 idx, u16 inc, u8 speed) in dwc2_desclist_idx_dec() argument
69 return (idx - inc) & in dwc2_desclist_idx_dec()
510 u16 idx) in dwc2_fill_host_isoc_dma_desc() argument
512 struct dwc2_hcd_dma_desc *dma_desc = &qh->desc_list[idx]; in dwc2_fill_host_isoc_dma_desc()
519 qh->n_bytes[idx] = max_xfer_size; in dwc2_fill_host_isoc_dma_desc()
521 qh->n_bytes[idx] = frame_desc->length; in dwc2_fill_host_isoc_dma_desc()
524 dma_desc->status = qh->n_bytes[idx] << HOST_DMA_ISOC_NBYTES_SHIFT & in dwc2_fill_host_isoc_dma_desc()
542 u16 idx, inc, n_desc, ntd_max = 0; in dwc2_init_isoc_dma_desc() local
544 idx = qh->td_last; in dwc2_init_isoc_dma_desc()
564 max_xfer_size, idx); in dwc2_init_isoc_dma_desc()
565 idx = dwc2_desclist_idx_inc(idx, inc, qh->dev_speed); in dwc2_init_isoc_dma_desc()
571 qh->td_last = idx; in dwc2_init_isoc_dma_desc()
576 idx = dwc2_desclist_idx_dec(qh->td_last, inc, qh->dev_speed); in dwc2_init_isoc_dma_desc()
577 qh->desc_list[idx].status |= HOST_DMA_IOC; in dwc2_init_isoc_dma_desc()
596 idx = dwc2_desclist_idx_dec(idx, inc * ((qh->ntd + 1) / 2), in dwc2_init_isoc_dma_desc()
604 idx = dwc2_desclist_idx_dec(qh->td_last, inc, qh->dev_speed); in dwc2_init_isoc_dma_desc()
606 qh->desc_list[idx].status |= HOST_DMA_IOC; in dwc2_init_isoc_dma_desc()
801 struct dwc2_qh *qh, u16 idx) in dwc2_cmpl_host_isoc_dma_desc() argument
803 struct dwc2_hcd_dma_desc *dma_desc = &qh->desc_list[idx]; in dwc2_cmpl_host_isoc_dma_desc()
824 frame_desc->actual_length = qh->n_bytes[idx] - remain; in dwc2_cmpl_host_isoc_dma_desc()
828 frame_desc->actual_length = qh->n_bytes[idx] - remain; in dwc2_cmpl_host_isoc_dma_desc()
867 u16 idx; in dwc2_complete_isoc_xfer_ddma() local
871 idx = qh->td_first; in dwc2_complete_isoc_xfer_ddma()
896 for (idx = 0; idx < qtd->urb->packet_count; in dwc2_complete_isoc_xfer_ddma()
897 idx++) { in dwc2_complete_isoc_xfer_ddma()
898 frame_desc = &qtd->urb->iso_descs[idx]; in dwc2_complete_isoc_xfer_ddma()
916 idx); in dwc2_complete_isoc_xfer_ddma()
919 idx = dwc2_desclist_idx_inc(idx, qh->interval, in dwc2_complete_isoc_xfer_ddma()
925 } while (idx != qh->td_first); in dwc2_complete_isoc_xfer_ddma()
929 qh->td_first = idx; in dwc2_complete_isoc_xfer_ddma()