Lines Matching refs:qh
436 struct dwc2_qh *qh; in dwc2_dump_channel_info() local
467 dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); in dwc2_dump_channel_info()
469 list_for_each_entry(qh, &hsotg->non_periodic_sched_inactive, in dwc2_dump_channel_info()
471 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
473 list_for_each_entry(qh, &hsotg->non_periodic_sched_waiting, in dwc2_dump_channel_info()
475 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
477 list_for_each_entry(qh, &hsotg->non_periodic_sched_active, in dwc2_dump_channel_info()
479 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
1050 wire_frame = dwc2_frame_num_inc(chan->qh->next_active_frame, 1); in dwc2_hc_set_even_odd_frame()
1062 chan->qh, wire_frame, frame_number, in dwc2_hc_set_even_odd_frame()
1075 chan->qh->next_active_frame = in dwc2_hc_set_even_odd_frame()
1602 struct dwc2_qh *qh, *qh_tmp; in dwc2_kill_urbs_in_qh_list() local
1605 list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { in dwc2_kill_urbs_in_qh_list()
1606 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_kill_urbs_in_qh_list()
1609 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_kill_urbs_in_qh_list()
1618 struct dwc2_qh *qh, *qh_tmp; in dwc2_qh_list_free() local
1630 list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { in dwc2_qh_list_free()
1631 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_qh_list_free()
1634 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_qh_list_free()
1636 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_qh_list_free()
1638 if (qh->channel && qh->channel->qh == qh) in dwc2_qh_list_free()
1639 qh->channel->qh = NULL; in dwc2_qh_list_free()
1642 dwc2_hcd_qh_free(hsotg, qh); in dwc2_qh_list_free()
1733 channel->qh = NULL; in dwc2_hcd_cleanup_channels()
1874 struct dwc2_hcd_urb *urb, struct dwc2_qh *qh, in dwc2_hcd_urb_enqueue() argument
1904 retval = dwc2_hcd_qtd_add(hsotg, qtd, qh); in dwc2_hcd_urb_enqueue()
1916 if (qtd->qh->ep_type == USB_ENDPOINT_XFER_BULK && in dwc2_hcd_urb_enqueue()
1936 struct dwc2_qh *qh; in dwc2_hcd_urb_dequeue() local
1945 qh = urb_qtd->qh; in dwc2_hcd_urb_dequeue()
1946 if (!qh) { in dwc2_hcd_urb_dequeue()
1953 if (urb_qtd->in_process && qh->channel) { in dwc2_hcd_urb_dequeue()
1954 dwc2_dump_channel_info(hsotg, qh->channel); in dwc2_hcd_urb_dequeue()
1965 dwc2_hc_halt(hsotg, qh->channel, in dwc2_hcd_urb_dequeue()
1976 dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); in dwc2_hcd_urb_dequeue()
1978 dwc2_hcd_qh_deactivate(hsotg, qh, 0); in dwc2_hcd_urb_dequeue()
1979 qh->channel = NULL; in dwc2_hcd_urb_dequeue()
1980 } else if (list_empty(&qh->qtd_list)) { in dwc2_hcd_urb_dequeue()
1981 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_hcd_urb_dequeue()
1984 dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); in dwc2_hcd_urb_dequeue()
1995 struct dwc2_qh *qh; in dwc2_hcd_endpoint_disable() local
2001 qh = ep->hcpriv; in dwc2_hcd_endpoint_disable()
2002 if (!qh) { in dwc2_hcd_endpoint_disable()
2007 while (!list_empty(&qh->qtd_list) && retry--) { in dwc2_hcd_endpoint_disable()
2018 qh = ep->hcpriv; in dwc2_hcd_endpoint_disable()
2019 if (!qh) { in dwc2_hcd_endpoint_disable()
2025 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_hcd_endpoint_disable()
2028 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) in dwc2_hcd_endpoint_disable()
2029 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_hcd_endpoint_disable()
2033 if (qh->channel && qh->channel->qh == qh) in dwc2_hcd_endpoint_disable()
2034 qh->channel->qh = NULL; in dwc2_hcd_endpoint_disable()
2038 dwc2_hcd_qh_free(hsotg, qh); in dwc2_hcd_endpoint_disable()
2053 struct dwc2_qh *qh = ep->hcpriv; in dwc2_hcd_endpoint_reset() local
2055 if (!qh) in dwc2_hcd_endpoint_reset()
2058 qh->data_toggle = DWC2_HC_PID_DATA0; in dwc2_hcd_endpoint_reset()
2439 struct dwc2_qh *qh, in dwc2_alloc_split_dma_aligned_buf() argument
2446 if (!qh->dw_align_buf) { in dwc2_alloc_split_dma_aligned_buf()
2447 qh->dw_align_buf = kmem_cache_alloc(hsotg->unaligned_cache, in dwc2_alloc_split_dma_aligned_buf()
2449 if (!qh->dw_align_buf) in dwc2_alloc_split_dma_aligned_buf()
2453 qh->dw_align_buf_dma = dma_map_single(hsotg->dev, qh->dw_align_buf, in dwc2_alloc_split_dma_aligned_buf()
2457 if (dma_mapping_error(hsotg->dev, qh->dw_align_buf_dma)) { in dwc2_alloc_split_dma_aligned_buf()
2463 chan->align_buf = qh->dw_align_buf_dma; in dwc2_alloc_split_dma_aligned_buf()
2573 static int dwc2_assign_and_init_hc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) in dwc2_assign_and_init_hc() argument
2579 if (dbg_qh(qh)) in dwc2_assign_and_init_hc()
2580 dev_vdbg(hsotg->dev, "%s(%p,%p)\n", __func__, hsotg, qh); in dwc2_assign_and_init_hc()
2582 if (list_empty(&qh->qtd_list)) { in dwc2_assign_and_init_hc()
2598 qtd = list_first_entry(&qh->qtd_list, struct dwc2_qtd, qtd_list_entry); in dwc2_assign_and_init_hc()
2600 qh->channel = chan; in dwc2_assign_and_init_hc()
2609 chan->speed = qh->dev_speed; in dwc2_assign_and_init_hc()
2610 chan->max_packet = qh->maxp; in dwc2_assign_and_init_hc()
2630 chan->do_ping = qh->ping_state; in dwc2_assign_and_init_hc()
2632 chan->data_pid_start = qh->data_toggle; in dwc2_assign_and_init_hc()
2648 if (qh->do_split) in dwc2_assign_and_init_hc()
2657 if (hsotg->params.host_dma && qh->do_split && in dwc2_assign_and_init_hc()
2660 if (dwc2_alloc_split_dma_aligned_buf(hsotg, qh, chan)) { in dwc2_assign_and_init_hc()
2669 qh->channel = NULL; in dwc2_assign_and_init_hc()
2688 chan->multi_count = qh->maxp_mult; in dwc2_assign_and_init_hc()
2691 chan->desc_list_addr = qh->desc_list_dma; in dwc2_assign_and_init_hc()
2692 chan->desc_list_sz = qh->desc_list_sz; in dwc2_assign_and_init_hc()
2696 chan->qh = qh; in dwc2_assign_and_init_hc()
2715 struct dwc2_qh *qh; in dwc2_hcd_select_transactions() local
2732 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_hcd_select_transactions()
2733 if (dwc2_assign_and_init_hc(hsotg, qh)) in dwc2_hcd_select_transactions()
2741 list_move_tail(&qh->qh_list_entry, in dwc2_hcd_select_transactions()
2760 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_hcd_select_transactions()
2767 if (dwc2_assign_and_init_hc(hsotg, qh)) in dwc2_hcd_select_transactions()
2775 list_move_tail(&qh->qh_list_entry, in dwc2_hcd_select_transactions()
2822 if (hsotg->params.host_dma && chan->qh) { in dwc2_queue_transaction()
2826 dwc2_hcd_start_xfer_ddma(hsotg, chan->qh); in dwc2_queue_transaction()
2827 chan->qh->ping_state = 0; in dwc2_queue_transaction()
2831 chan->qh->ping_state = 0; in dwc2_queue_transaction()
2876 struct dwc2_qh *qh; in dwc2_process_periodic_channels() local
2915 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_process_periodic_channels()
2916 if (!qh->channel) { in dwc2_process_periodic_channels()
2922 if (qh->tt_buffer_dirty) { in dwc2_process_periodic_channels()
2933 qh->channel->multi_count > 1) in dwc2_process_periodic_channels()
2938 status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); in dwc2_process_periodic_channels()
2952 qh->channel->requests == qh->channel->multi_count) { in dwc2_process_periodic_channels()
2958 list_move_tail(&qh->qh_list_entry, in dwc2_process_periodic_channels()
3010 struct dwc2_qh *qh; in dwc2_process_non_periodic_channels() local
3053 qh = list_entry(hsotg->non_periodic_qh_ptr, struct dwc2_qh, in dwc2_process_non_periodic_channels()
3055 if (!qh->channel) in dwc2_process_non_periodic_channels()
3059 if (qh->tt_buffer_dirty) in dwc2_process_non_periodic_channels()
3064 status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); in dwc2_process_non_periodic_channels()
3931 dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); in dwc2_hcd_dump_state()
3948 if (!(chan->xfer_started && chan->qh)) in dwc2_hcd_dump_state()
3951 list_for_each_entry(qtd, &chan->qh->qtd_list, qtd_list_entry) { in dwc2_hcd_dump_state()
4649 struct dwc2_qh *qh; in _dwc2_hcd_urb_enqueue() local
4757 qh = (struct dwc2_qh *)ep->hcpriv; in _dwc2_hcd_urb_enqueue()
4759 if (!qh) { in _dwc2_hcd_urb_enqueue()
4760 qh = dwc2_hcd_qh_create(hsotg, dwc2_urb, mem_flags); in _dwc2_hcd_urb_enqueue()
4761 if (!qh) { in _dwc2_hcd_urb_enqueue()
4765 ep->hcpriv = qh; in _dwc2_hcd_urb_enqueue()
4780 retval = dwc2_hcd_urb_enqueue(hsotg, dwc2_urb, qh, qtd); in _dwc2_hcd_urb_enqueue()
4797 if (qh_allocated && qh->channel && qh->channel->qh == qh) in _dwc2_hcd_urb_enqueue()
4798 qh->channel->qh = NULL; in _dwc2_hcd_urb_enqueue()
4808 dwc2_hcd_qh_unlink(hsotg, qh); in _dwc2_hcd_urb_enqueue()
4810 list_for_each_entry_safe(qtd2, qtd2_tmp, &qh->qtd_list, in _dwc2_hcd_urb_enqueue()
4812 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd2, qh); in _dwc2_hcd_urb_enqueue()
4813 dwc2_hcd_qh_free(hsotg, qh); in _dwc2_hcd_urb_enqueue()
4943 struct dwc2_qh *qh; in _dwc2_hcd_clear_tt_buffer_complete() local
4946 qh = ep->hcpriv; in _dwc2_hcd_clear_tt_buffer_complete()
4947 if (!qh) in _dwc2_hcd_clear_tt_buffer_complete()
4951 qh->tt_buffer_dirty = 0; in _dwc2_hcd_clear_tt_buffer_complete()