Lines Matching refs:qh
407 struct dwc2_qh *qh; in dwc2_dump_channel_info() local
438 dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); in dwc2_dump_channel_info()
440 list_for_each_entry(qh, &hsotg->non_periodic_sched_inactive, in dwc2_dump_channel_info()
442 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
444 list_for_each_entry(qh, &hsotg->non_periodic_sched_waiting, in dwc2_dump_channel_info()
446 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
448 list_for_each_entry(qh, &hsotg->non_periodic_sched_active, in dwc2_dump_channel_info()
450 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
1021 wire_frame = dwc2_frame_num_inc(chan->qh->next_active_frame, 1); in dwc2_hc_set_even_odd_frame()
1033 chan->qh, wire_frame, frame_number, in dwc2_hc_set_even_odd_frame()
1046 chan->qh->next_active_frame = in dwc2_hc_set_even_odd_frame()
1573 struct dwc2_qh *qh, *qh_tmp; in dwc2_kill_urbs_in_qh_list() local
1576 list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { in dwc2_kill_urbs_in_qh_list()
1577 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_kill_urbs_in_qh_list()
1580 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_kill_urbs_in_qh_list()
1589 struct dwc2_qh *qh, *qh_tmp; in dwc2_qh_list_free() local
1601 list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { in dwc2_qh_list_free()
1602 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_qh_list_free()
1605 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_qh_list_free()
1607 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_qh_list_free()
1609 if (qh->channel && qh->channel->qh == qh) in dwc2_qh_list_free()
1610 qh->channel->qh = NULL; in dwc2_qh_list_free()
1613 dwc2_hcd_qh_free(hsotg, qh); in dwc2_qh_list_free()
1704 channel->qh = NULL; in dwc2_hcd_cleanup_channels()
1845 struct dwc2_hcd_urb *urb, struct dwc2_qh *qh, in dwc2_hcd_urb_enqueue() argument
1875 retval = dwc2_hcd_qtd_add(hsotg, qtd, qh); in dwc2_hcd_urb_enqueue()
1887 if (qtd->qh->ep_type == USB_ENDPOINT_XFER_BULK && in dwc2_hcd_urb_enqueue()
1907 struct dwc2_qh *qh; in dwc2_hcd_urb_dequeue() local
1916 qh = urb_qtd->qh; in dwc2_hcd_urb_dequeue()
1917 if (!qh) { in dwc2_hcd_urb_dequeue()
1924 if (urb_qtd->in_process && qh->channel) { in dwc2_hcd_urb_dequeue()
1925 dwc2_dump_channel_info(hsotg, qh->channel); in dwc2_hcd_urb_dequeue()
1936 dwc2_hc_halt(hsotg, qh->channel, in dwc2_hcd_urb_dequeue()
1947 dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); in dwc2_hcd_urb_dequeue()
1949 dwc2_hcd_qh_deactivate(hsotg, qh, 0); in dwc2_hcd_urb_dequeue()
1950 qh->channel = NULL; in dwc2_hcd_urb_dequeue()
1951 } else if (list_empty(&qh->qtd_list)) { in dwc2_hcd_urb_dequeue()
1952 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_hcd_urb_dequeue()
1955 dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); in dwc2_hcd_urb_dequeue()
1966 struct dwc2_qh *qh; in dwc2_hcd_endpoint_disable() local
1972 qh = ep->hcpriv; in dwc2_hcd_endpoint_disable()
1973 if (!qh) { in dwc2_hcd_endpoint_disable()
1978 while (!list_empty(&qh->qtd_list) && retry--) { in dwc2_hcd_endpoint_disable()
1989 qh = ep->hcpriv; in dwc2_hcd_endpoint_disable()
1990 if (!qh) { in dwc2_hcd_endpoint_disable()
1996 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_hcd_endpoint_disable()
1999 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) in dwc2_hcd_endpoint_disable()
2000 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_hcd_endpoint_disable()
2004 if (qh->channel && qh->channel->qh == qh) in dwc2_hcd_endpoint_disable()
2005 qh->channel->qh = NULL; in dwc2_hcd_endpoint_disable()
2009 dwc2_hcd_qh_free(hsotg, qh); in dwc2_hcd_endpoint_disable()
2024 struct dwc2_qh *qh = ep->hcpriv; in dwc2_hcd_endpoint_reset() local
2026 if (!qh) in dwc2_hcd_endpoint_reset()
2029 qh->data_toggle = DWC2_HC_PID_DATA0; in dwc2_hcd_endpoint_reset()
2410 struct dwc2_qh *qh, in dwc2_alloc_split_dma_aligned_buf() argument
2417 if (!qh->dw_align_buf) { in dwc2_alloc_split_dma_aligned_buf()
2418 qh->dw_align_buf = kmem_cache_alloc(hsotg->unaligned_cache, in dwc2_alloc_split_dma_aligned_buf()
2420 if (!qh->dw_align_buf) in dwc2_alloc_split_dma_aligned_buf()
2424 qh->dw_align_buf_dma = dma_map_single(hsotg->dev, qh->dw_align_buf, in dwc2_alloc_split_dma_aligned_buf()
2428 if (dma_mapping_error(hsotg->dev, qh->dw_align_buf_dma)) { in dwc2_alloc_split_dma_aligned_buf()
2434 chan->align_buf = qh->dw_align_buf_dma; in dwc2_alloc_split_dma_aligned_buf()
2544 static int dwc2_assign_and_init_hc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) in dwc2_assign_and_init_hc() argument
2550 if (dbg_qh(qh)) in dwc2_assign_and_init_hc()
2551 dev_vdbg(hsotg->dev, "%s(%p,%p)\n", __func__, hsotg, qh); in dwc2_assign_and_init_hc()
2553 if (list_empty(&qh->qtd_list)) { in dwc2_assign_and_init_hc()
2569 qtd = list_first_entry(&qh->qtd_list, struct dwc2_qtd, qtd_list_entry); in dwc2_assign_and_init_hc()
2571 qh->channel = chan; in dwc2_assign_and_init_hc()
2580 chan->speed = qh->dev_speed; in dwc2_assign_and_init_hc()
2581 chan->max_packet = qh->maxp; in dwc2_assign_and_init_hc()
2601 chan->do_ping = qh->ping_state; in dwc2_assign_and_init_hc()
2603 chan->data_pid_start = qh->data_toggle; in dwc2_assign_and_init_hc()
2619 if (qh->do_split) in dwc2_assign_and_init_hc()
2628 if (hsotg->params.host_dma && qh->do_split && in dwc2_assign_and_init_hc()
2631 if (dwc2_alloc_split_dma_aligned_buf(hsotg, qh, chan)) { in dwc2_assign_and_init_hc()
2640 qh->channel = NULL; in dwc2_assign_and_init_hc()
2659 chan->multi_count = qh->maxp_mult; in dwc2_assign_and_init_hc()
2662 chan->desc_list_addr = qh->desc_list_dma; in dwc2_assign_and_init_hc()
2663 chan->desc_list_sz = qh->desc_list_sz; in dwc2_assign_and_init_hc()
2667 chan->qh = qh; in dwc2_assign_and_init_hc()
2686 struct dwc2_qh *qh; in dwc2_hcd_select_transactions() local
2703 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_hcd_select_transactions()
2704 if (dwc2_assign_and_init_hc(hsotg, qh)) in dwc2_hcd_select_transactions()
2712 list_move_tail(&qh->qh_list_entry, in dwc2_hcd_select_transactions()
2731 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_hcd_select_transactions()
2738 if (dwc2_assign_and_init_hc(hsotg, qh)) in dwc2_hcd_select_transactions()
2746 list_move_tail(&qh->qh_list_entry, in dwc2_hcd_select_transactions()
2793 if (hsotg->params.host_dma && chan->qh) { in dwc2_queue_transaction()
2797 dwc2_hcd_start_xfer_ddma(hsotg, chan->qh); in dwc2_queue_transaction()
2798 chan->qh->ping_state = 0; in dwc2_queue_transaction()
2802 chan->qh->ping_state = 0; in dwc2_queue_transaction()
2847 struct dwc2_qh *qh; in dwc2_process_periodic_channels() local
2886 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_process_periodic_channels()
2887 if (!qh->channel) { in dwc2_process_periodic_channels()
2893 if (qh->tt_buffer_dirty) { in dwc2_process_periodic_channels()
2904 qh->channel->multi_count > 1) in dwc2_process_periodic_channels()
2909 status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); in dwc2_process_periodic_channels()
2923 qh->channel->requests == qh->channel->multi_count) { in dwc2_process_periodic_channels()
2929 list_move_tail(&qh->qh_list_entry, in dwc2_process_periodic_channels()
2981 struct dwc2_qh *qh; in dwc2_process_non_periodic_channels() local
3024 qh = list_entry(hsotg->non_periodic_qh_ptr, struct dwc2_qh, in dwc2_process_non_periodic_channels()
3026 if (!qh->channel) in dwc2_process_non_periodic_channels()
3030 if (qh->tt_buffer_dirty) in dwc2_process_non_periodic_channels()
3035 status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); in dwc2_process_non_periodic_channels()
3902 dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); in dwc2_hcd_dump_state()
3919 if (!(chan->xfer_started && chan->qh)) in dwc2_hcd_dump_state()
3922 list_for_each_entry(qtd, &chan->qh->qtd_list, qtd_list_entry) { in dwc2_hcd_dump_state()
4621 struct dwc2_qh *qh; in _dwc2_hcd_urb_enqueue() local
4729 qh = (struct dwc2_qh *)ep->hcpriv; in _dwc2_hcd_urb_enqueue()
4731 if (!qh) { in _dwc2_hcd_urb_enqueue()
4732 qh = dwc2_hcd_qh_create(hsotg, dwc2_urb, mem_flags); in _dwc2_hcd_urb_enqueue()
4733 if (!qh) { in _dwc2_hcd_urb_enqueue()
4737 ep->hcpriv = qh; in _dwc2_hcd_urb_enqueue()
4752 retval = dwc2_hcd_urb_enqueue(hsotg, dwc2_urb, qh, qtd); in _dwc2_hcd_urb_enqueue()
4769 if (qh_allocated && qh->channel && qh->channel->qh == qh) in _dwc2_hcd_urb_enqueue()
4770 qh->channel->qh = NULL; in _dwc2_hcd_urb_enqueue()
4780 dwc2_hcd_qh_unlink(hsotg, qh); in _dwc2_hcd_urb_enqueue()
4782 list_for_each_entry_safe(qtd2, qtd2_tmp, &qh->qtd_list, in _dwc2_hcd_urb_enqueue()
4784 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd2, qh); in _dwc2_hcd_urb_enqueue()
4785 dwc2_hcd_qh_free(hsotg, qh); in _dwc2_hcd_urb_enqueue()
4915 struct dwc2_qh *qh; in _dwc2_hcd_clear_tt_buffer_complete() local
4918 qh = ep->hcpriv; in _dwc2_hcd_clear_tt_buffer_complete()
4919 if (!qh) in _dwc2_hcd_clear_tt_buffer_complete()
4923 qh->tt_buffer_dirty = 0; in _dwc2_hcd_clear_tt_buffer_complete()