Lines Matching refs:qh

442 	struct dwc2_qh *qh;  in dwc2_dump_channel_info()  local
473 dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); in dwc2_dump_channel_info()
475 list_for_each_entry(qh, &hsotg->non_periodic_sched_inactive, in dwc2_dump_channel_info()
477 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
479 list_for_each_entry(qh, &hsotg->non_periodic_sched_waiting, in dwc2_dump_channel_info()
481 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
483 list_for_each_entry(qh, &hsotg->non_periodic_sched_active, in dwc2_dump_channel_info()
485 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
1058 wire_frame = dwc2_frame_num_inc(chan->qh->next_active_frame, 1); in dwc2_hc_set_even_odd_frame()
1070 chan->qh, wire_frame, frame_number, in dwc2_hc_set_even_odd_frame()
1083 chan->qh->next_active_frame = in dwc2_hc_set_even_odd_frame()
1610 struct dwc2_qh *qh, *qh_tmp; in dwc2_kill_urbs_in_qh_list() local
1613 list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { in dwc2_kill_urbs_in_qh_list()
1614 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_kill_urbs_in_qh_list()
1617 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_kill_urbs_in_qh_list()
1626 struct dwc2_qh *qh, *qh_tmp; in dwc2_qh_list_free() local
1638 list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { in dwc2_qh_list_free()
1639 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_qh_list_free()
1642 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_qh_list_free()
1644 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_qh_list_free()
1646 if (qh->channel && qh->channel->qh == qh) in dwc2_qh_list_free()
1647 qh->channel->qh = NULL; in dwc2_qh_list_free()
1650 dwc2_hcd_qh_free(hsotg, qh); in dwc2_qh_list_free()
1741 channel->qh = NULL; in dwc2_hcd_cleanup_channels()
1884 struct dwc2_hcd_urb *urb, struct dwc2_qh *qh, in dwc2_hcd_urb_enqueue() argument
1914 retval = dwc2_hcd_qtd_add(hsotg, qtd, qh); in dwc2_hcd_urb_enqueue()
1926 if (qtd->qh->ep_type == USB_ENDPOINT_XFER_BULK && in dwc2_hcd_urb_enqueue()
1946 struct dwc2_qh *qh; in dwc2_hcd_urb_dequeue() local
1955 qh = urb_qtd->qh; in dwc2_hcd_urb_dequeue()
1956 if (!qh) { in dwc2_hcd_urb_dequeue()
1963 if (urb_qtd->in_process && qh->channel) { in dwc2_hcd_urb_dequeue()
1964 dwc2_dump_channel_info(hsotg, qh->channel); in dwc2_hcd_urb_dequeue()
1975 dwc2_hc_halt(hsotg, qh->channel, in dwc2_hcd_urb_dequeue()
1986 dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); in dwc2_hcd_urb_dequeue()
1988 dwc2_hcd_qh_deactivate(hsotg, qh, 0); in dwc2_hcd_urb_dequeue()
1989 qh->channel = NULL; in dwc2_hcd_urb_dequeue()
1990 } else if (list_empty(&qh->qtd_list)) { in dwc2_hcd_urb_dequeue()
1991 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_hcd_urb_dequeue()
1994 dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); in dwc2_hcd_urb_dequeue()
2005 struct dwc2_qh *qh; in dwc2_hcd_endpoint_disable() local
2011 qh = ep->hcpriv; in dwc2_hcd_endpoint_disable()
2012 if (!qh) { in dwc2_hcd_endpoint_disable()
2017 while (!list_empty(&qh->qtd_list) && retry--) { in dwc2_hcd_endpoint_disable()
2028 qh = ep->hcpriv; in dwc2_hcd_endpoint_disable()
2029 if (!qh) { in dwc2_hcd_endpoint_disable()
2035 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_hcd_endpoint_disable()
2038 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) in dwc2_hcd_endpoint_disable()
2039 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_hcd_endpoint_disable()
2043 if (qh->channel && qh->channel->qh == qh) in dwc2_hcd_endpoint_disable()
2044 qh->channel->qh = NULL; in dwc2_hcd_endpoint_disable()
2048 dwc2_hcd_qh_free(hsotg, qh); in dwc2_hcd_endpoint_disable()
2063 struct dwc2_qh *qh = ep->hcpriv; in dwc2_hcd_endpoint_reset() local
2065 if (!qh) in dwc2_hcd_endpoint_reset()
2068 qh->data_toggle = DWC2_HC_PID_DATA0; in dwc2_hcd_endpoint_reset()
2449 struct dwc2_qh *qh, in dwc2_alloc_qh_dma_aligned_buf() argument
2459 if (!qh->dw_align_buf) { in dwc2_alloc_qh_dma_aligned_buf()
2460 qh->dw_align_buf = kmem_cache_alloc(hsotg->unaligned_cache, in dwc2_alloc_qh_dma_aligned_buf()
2462 if (!qh->dw_align_buf) in dwc2_alloc_qh_dma_aligned_buf()
2467 if (qh->do_split) { in dwc2_alloc_qh_dma_aligned_buf()
2469 memcpy(qh->dw_align_buf, (u8 *)qtd->urb->buf + offset, in dwc2_alloc_qh_dma_aligned_buf()
2473 memcpy(qh->dw_align_buf, (u8 *)qtd->urb->buf + offset, in dwc2_alloc_qh_dma_aligned_buf()
2478 qh->dw_align_buf_dma = dma_map_single(hsotg->dev, qh->dw_align_buf, in dwc2_alloc_qh_dma_aligned_buf()
2482 if (dma_mapping_error(hsotg->dev, qh->dw_align_buf_dma)) { in dwc2_alloc_qh_dma_aligned_buf()
2488 chan->align_buf = qh->dw_align_buf_dma; in dwc2_alloc_qh_dma_aligned_buf()
2598 static int dwc2_assign_and_init_hc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) in dwc2_assign_and_init_hc() argument
2604 if (dbg_qh(qh)) in dwc2_assign_and_init_hc()
2605 dev_vdbg(hsotg->dev, "%s(%p,%p)\n", __func__, hsotg, qh); in dwc2_assign_and_init_hc()
2607 if (list_empty(&qh->qtd_list)) { in dwc2_assign_and_init_hc()
2623 qtd = list_first_entry(&qh->qtd_list, struct dwc2_qtd, qtd_list_entry); in dwc2_assign_and_init_hc()
2625 qh->channel = chan; in dwc2_assign_and_init_hc()
2634 chan->speed = qh->dev_speed; in dwc2_assign_and_init_hc()
2635 chan->max_packet = qh->maxp; in dwc2_assign_and_init_hc()
2655 chan->do_ping = qh->ping_state; in dwc2_assign_and_init_hc()
2657 chan->data_pid_start = qh->data_toggle; in dwc2_assign_and_init_hc()
2673 if (qh->do_split) in dwc2_assign_and_init_hc()
2685 if (dwc2_alloc_qh_dma_aligned_buf(hsotg, qh, qtd, chan)) { in dwc2_assign_and_init_hc()
2694 qh->channel = NULL; in dwc2_assign_and_init_hc()
2713 chan->multi_count = qh->maxp_mult; in dwc2_assign_and_init_hc()
2716 chan->desc_list_addr = qh->desc_list_dma; in dwc2_assign_and_init_hc()
2717 chan->desc_list_sz = qh->desc_list_sz; in dwc2_assign_and_init_hc()
2721 chan->qh = qh; in dwc2_assign_and_init_hc()
2740 struct dwc2_qh *qh; in dwc2_hcd_select_transactions() local
2757 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_hcd_select_transactions()
2758 if (dwc2_assign_and_init_hc(hsotg, qh)) in dwc2_hcd_select_transactions()
2766 list_move_tail(&qh->qh_list_entry, in dwc2_hcd_select_transactions()
2785 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_hcd_select_transactions()
2792 if (dwc2_assign_and_init_hc(hsotg, qh)) in dwc2_hcd_select_transactions()
2800 list_move_tail(&qh->qh_list_entry, in dwc2_hcd_select_transactions()
2847 if (hsotg->params.host_dma && chan->qh) { in dwc2_queue_transaction()
2851 dwc2_hcd_start_xfer_ddma(hsotg, chan->qh); in dwc2_queue_transaction()
2852 chan->qh->ping_state = 0; in dwc2_queue_transaction()
2856 chan->qh->ping_state = 0; in dwc2_queue_transaction()
2901 struct dwc2_qh *qh; in dwc2_process_periodic_channels() local
2940 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_process_periodic_channels()
2941 if (!qh->channel) { in dwc2_process_periodic_channels()
2947 if (qh->tt_buffer_dirty) { in dwc2_process_periodic_channels()
2958 qh->channel->multi_count > 1) in dwc2_process_periodic_channels()
2963 status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); in dwc2_process_periodic_channels()
2977 qh->channel->requests == qh->channel->multi_count) { in dwc2_process_periodic_channels()
2983 list_move_tail(&qh->qh_list_entry, in dwc2_process_periodic_channels()
3035 struct dwc2_qh *qh; in dwc2_process_non_periodic_channels() local
3078 qh = list_entry(hsotg->non_periodic_qh_ptr, struct dwc2_qh, in dwc2_process_non_periodic_channels()
3080 if (!qh->channel) in dwc2_process_non_periodic_channels()
3084 if (qh->tt_buffer_dirty) in dwc2_process_non_periodic_channels()
3089 status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); in dwc2_process_non_periodic_channels()
3906 dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); in dwc2_hcd_dump_state()
3923 if (!(chan->xfer_started && chan->qh)) in dwc2_hcd_dump_state()
3926 list_for_each_entry(qtd, &chan->qh->qtd_list, qtd_list_entry) { in dwc2_hcd_dump_state()
4587 struct dwc2_qh *qh; in _dwc2_hcd_urb_enqueue() local
4666 qh = (struct dwc2_qh *)ep->hcpriv; in _dwc2_hcd_urb_enqueue()
4668 if (!qh) { in _dwc2_hcd_urb_enqueue()
4669 qh = dwc2_hcd_qh_create(hsotg, dwc2_urb, mem_flags); in _dwc2_hcd_urb_enqueue()
4670 if (!qh) { in _dwc2_hcd_urb_enqueue()
4674 ep->hcpriv = qh; in _dwc2_hcd_urb_enqueue()
4689 retval = dwc2_hcd_urb_enqueue(hsotg, dwc2_urb, qh, qtd); in _dwc2_hcd_urb_enqueue()
4706 if (qh_allocated && qh->channel && qh->channel->qh == qh) in _dwc2_hcd_urb_enqueue()
4707 qh->channel->qh = NULL; in _dwc2_hcd_urb_enqueue()
4717 dwc2_hcd_qh_unlink(hsotg, qh); in _dwc2_hcd_urb_enqueue()
4719 list_for_each_entry_safe(qtd2, qtd2_tmp, &qh->qtd_list, in _dwc2_hcd_urb_enqueue()
4721 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd2, qh); in _dwc2_hcd_urb_enqueue()
4722 dwc2_hcd_qh_free(hsotg, qh); in _dwc2_hcd_urb_enqueue()
4852 struct dwc2_qh *qh; in _dwc2_hcd_clear_tt_buffer_complete() local
4855 qh = ep->hcpriv; in _dwc2_hcd_clear_tt_buffer_complete()
4856 if (!qh) in _dwc2_hcd_clear_tt_buffer_complete()
4860 qh->tt_buffer_dirty = 0; in _dwc2_hcd_clear_tt_buffer_complete()