Lines Matching refs:qh

440 	struct dwc2_qh *qh;  in dwc2_dump_channel_info()  local
471 dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); in dwc2_dump_channel_info()
473 list_for_each_entry(qh, &hsotg->non_periodic_sched_inactive, 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_waiting, in dwc2_dump_channel_info()
479 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
481 list_for_each_entry(qh, &hsotg->non_periodic_sched_active, in dwc2_dump_channel_info()
483 dev_dbg(hsotg->dev, " %p\n", qh); in dwc2_dump_channel_info()
1054 wire_frame = dwc2_frame_num_inc(chan->qh->next_active_frame, 1); in dwc2_hc_set_even_odd_frame()
1066 chan->qh, wire_frame, frame_number, in dwc2_hc_set_even_odd_frame()
1079 chan->qh->next_active_frame = in dwc2_hc_set_even_odd_frame()
1606 struct dwc2_qh *qh, *qh_tmp; in dwc2_kill_urbs_in_qh_list() local
1609 list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { in dwc2_kill_urbs_in_qh_list()
1610 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_kill_urbs_in_qh_list()
1613 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_kill_urbs_in_qh_list()
1622 struct dwc2_qh *qh, *qh_tmp; in dwc2_qh_list_free() local
1634 list_for_each_entry_safe(qh, qh_tmp, qh_list, qh_list_entry) { in dwc2_qh_list_free()
1635 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_qh_list_free()
1638 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, in dwc2_qh_list_free()
1640 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_qh_list_free()
1642 if (qh->channel && qh->channel->qh == qh) in dwc2_qh_list_free()
1643 qh->channel->qh = NULL; in dwc2_qh_list_free()
1646 dwc2_hcd_qh_free(hsotg, qh); in dwc2_qh_list_free()
1737 channel->qh = NULL; in dwc2_hcd_cleanup_channels()
1878 struct dwc2_hcd_urb *urb, struct dwc2_qh *qh, in dwc2_hcd_urb_enqueue() argument
1908 retval = dwc2_hcd_qtd_add(hsotg, qtd, qh); in dwc2_hcd_urb_enqueue()
1920 if (qtd->qh->ep_type == USB_ENDPOINT_XFER_BULK && in dwc2_hcd_urb_enqueue()
1940 struct dwc2_qh *qh; in dwc2_hcd_urb_dequeue() local
1949 qh = urb_qtd->qh; in dwc2_hcd_urb_dequeue()
1950 if (!qh) { in dwc2_hcd_urb_dequeue()
1957 if (urb_qtd->in_process && qh->channel) { in dwc2_hcd_urb_dequeue()
1958 dwc2_dump_channel_info(hsotg, qh->channel); in dwc2_hcd_urb_dequeue()
1969 dwc2_hc_halt(hsotg, qh->channel, in dwc2_hcd_urb_dequeue()
1980 dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); in dwc2_hcd_urb_dequeue()
1982 dwc2_hcd_qh_deactivate(hsotg, qh, 0); in dwc2_hcd_urb_dequeue()
1983 qh->channel = NULL; in dwc2_hcd_urb_dequeue()
1984 } else if (list_empty(&qh->qtd_list)) { in dwc2_hcd_urb_dequeue()
1985 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_hcd_urb_dequeue()
1988 dwc2_hcd_qtd_unlink_and_free(hsotg, urb_qtd, qh); in dwc2_hcd_urb_dequeue()
1999 struct dwc2_qh *qh; in dwc2_hcd_endpoint_disable() local
2005 qh = ep->hcpriv; in dwc2_hcd_endpoint_disable()
2006 if (!qh) { in dwc2_hcd_endpoint_disable()
2011 while (!list_empty(&qh->qtd_list) && retry--) { in dwc2_hcd_endpoint_disable()
2022 qh = ep->hcpriv; in dwc2_hcd_endpoint_disable()
2023 if (!qh) { in dwc2_hcd_endpoint_disable()
2029 dwc2_hcd_qh_unlink(hsotg, qh); in dwc2_hcd_endpoint_disable()
2032 list_for_each_entry_safe(qtd, qtd_tmp, &qh->qtd_list, qtd_list_entry) in dwc2_hcd_endpoint_disable()
2033 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh); in dwc2_hcd_endpoint_disable()
2037 if (qh->channel && qh->channel->qh == qh) in dwc2_hcd_endpoint_disable()
2038 qh->channel->qh = NULL; in dwc2_hcd_endpoint_disable()
2042 dwc2_hcd_qh_free(hsotg, qh); in dwc2_hcd_endpoint_disable()
2057 struct dwc2_qh *qh = ep->hcpriv; in dwc2_hcd_endpoint_reset() local
2059 if (!qh) in dwc2_hcd_endpoint_reset()
2062 qh->data_toggle = DWC2_HC_PID_DATA0; in dwc2_hcd_endpoint_reset()
2443 struct dwc2_qh *qh, in dwc2_alloc_split_dma_aligned_buf() argument
2450 if (!qh->dw_align_buf) { in dwc2_alloc_split_dma_aligned_buf()
2451 qh->dw_align_buf = kmem_cache_alloc(hsotg->unaligned_cache, in dwc2_alloc_split_dma_aligned_buf()
2453 if (!qh->dw_align_buf) in dwc2_alloc_split_dma_aligned_buf()
2457 qh->dw_align_buf_dma = dma_map_single(hsotg->dev, qh->dw_align_buf, in dwc2_alloc_split_dma_aligned_buf()
2461 if (dma_mapping_error(hsotg->dev, qh->dw_align_buf_dma)) { in dwc2_alloc_split_dma_aligned_buf()
2467 chan->align_buf = qh->dw_align_buf_dma; in dwc2_alloc_split_dma_aligned_buf()
2577 static int dwc2_assign_and_init_hc(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) in dwc2_assign_and_init_hc() argument
2583 if (dbg_qh(qh)) in dwc2_assign_and_init_hc()
2584 dev_vdbg(hsotg->dev, "%s(%p,%p)\n", __func__, hsotg, qh); in dwc2_assign_and_init_hc()
2586 if (list_empty(&qh->qtd_list)) { in dwc2_assign_and_init_hc()
2602 qtd = list_first_entry(&qh->qtd_list, struct dwc2_qtd, qtd_list_entry); in dwc2_assign_and_init_hc()
2604 qh->channel = chan; in dwc2_assign_and_init_hc()
2613 chan->speed = qh->dev_speed; in dwc2_assign_and_init_hc()
2614 chan->max_packet = qh->maxp; in dwc2_assign_and_init_hc()
2634 chan->do_ping = qh->ping_state; in dwc2_assign_and_init_hc()
2636 chan->data_pid_start = qh->data_toggle; in dwc2_assign_and_init_hc()
2652 if (qh->do_split) in dwc2_assign_and_init_hc()
2661 if (hsotg->params.host_dma && qh->do_split && in dwc2_assign_and_init_hc()
2664 if (dwc2_alloc_split_dma_aligned_buf(hsotg, qh, chan)) { in dwc2_assign_and_init_hc()
2673 qh->channel = NULL; in dwc2_assign_and_init_hc()
2692 chan->multi_count = qh->maxp_mult; in dwc2_assign_and_init_hc()
2695 chan->desc_list_addr = qh->desc_list_dma; in dwc2_assign_and_init_hc()
2696 chan->desc_list_sz = qh->desc_list_sz; in dwc2_assign_and_init_hc()
2700 chan->qh = qh; in dwc2_assign_and_init_hc()
2719 struct dwc2_qh *qh; in dwc2_hcd_select_transactions() local
2736 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_hcd_select_transactions()
2737 if (dwc2_assign_and_init_hc(hsotg, qh)) in dwc2_hcd_select_transactions()
2745 list_move_tail(&qh->qh_list_entry, in dwc2_hcd_select_transactions()
2764 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_hcd_select_transactions()
2771 if (dwc2_assign_and_init_hc(hsotg, qh)) in dwc2_hcd_select_transactions()
2779 list_move_tail(&qh->qh_list_entry, in dwc2_hcd_select_transactions()
2826 if (hsotg->params.host_dma && chan->qh) { in dwc2_queue_transaction()
2830 dwc2_hcd_start_xfer_ddma(hsotg, chan->qh); in dwc2_queue_transaction()
2831 chan->qh->ping_state = 0; in dwc2_queue_transaction()
2835 chan->qh->ping_state = 0; in dwc2_queue_transaction()
2880 struct dwc2_qh *qh; in dwc2_process_periodic_channels() local
2919 qh = list_entry(qh_ptr, struct dwc2_qh, qh_list_entry); in dwc2_process_periodic_channels()
2920 if (!qh->channel) { in dwc2_process_periodic_channels()
2926 if (qh->tt_buffer_dirty) { in dwc2_process_periodic_channels()
2937 qh->channel->multi_count > 1) in dwc2_process_periodic_channels()
2942 status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); in dwc2_process_periodic_channels()
2956 qh->channel->requests == qh->channel->multi_count) { in dwc2_process_periodic_channels()
2962 list_move_tail(&qh->qh_list_entry, in dwc2_process_periodic_channels()
3014 struct dwc2_qh *qh; in dwc2_process_non_periodic_channels() local
3057 qh = list_entry(hsotg->non_periodic_qh_ptr, struct dwc2_qh, in dwc2_process_non_periodic_channels()
3059 if (!qh->channel) in dwc2_process_non_periodic_channels()
3063 if (qh->tt_buffer_dirty) in dwc2_process_non_periodic_channels()
3068 status = dwc2_queue_transaction(hsotg, qh->channel, fspcavail); in dwc2_process_non_periodic_channels()
3935 dev_dbg(hsotg->dev, " qh: %p\n", chan->qh); in dwc2_hcd_dump_state()
3952 if (!(chan->xfer_started && chan->qh)) in dwc2_hcd_dump_state()
3955 list_for_each_entry(qtd, &chan->qh->qtd_list, qtd_list_entry) { in dwc2_hcd_dump_state()
4653 struct dwc2_qh *qh; in _dwc2_hcd_urb_enqueue() local
4761 qh = (struct dwc2_qh *)ep->hcpriv; in _dwc2_hcd_urb_enqueue()
4763 if (!qh) { in _dwc2_hcd_urb_enqueue()
4764 qh = dwc2_hcd_qh_create(hsotg, dwc2_urb, mem_flags); in _dwc2_hcd_urb_enqueue()
4765 if (!qh) { in _dwc2_hcd_urb_enqueue()
4769 ep->hcpriv = qh; in _dwc2_hcd_urb_enqueue()
4784 retval = dwc2_hcd_urb_enqueue(hsotg, dwc2_urb, qh, qtd); in _dwc2_hcd_urb_enqueue()
4801 if (qh_allocated && qh->channel && qh->channel->qh == qh) in _dwc2_hcd_urb_enqueue()
4802 qh->channel->qh = NULL; in _dwc2_hcd_urb_enqueue()
4812 dwc2_hcd_qh_unlink(hsotg, qh); in _dwc2_hcd_urb_enqueue()
4814 list_for_each_entry_safe(qtd2, qtd2_tmp, &qh->qtd_list, in _dwc2_hcd_urb_enqueue()
4816 dwc2_hcd_qtd_unlink_and_free(hsotg, qtd2, qh); in _dwc2_hcd_urb_enqueue()
4817 dwc2_hcd_qh_free(hsotg, qh); in _dwc2_hcd_urb_enqueue()
4947 struct dwc2_qh *qh; in _dwc2_hcd_clear_tt_buffer_complete() local
4950 qh = ep->hcpriv; in _dwc2_hcd_clear_tt_buffer_complete()
4951 if (!qh) in _dwc2_hcd_clear_tt_buffer_complete()
4955 qh->tt_buffer_dirty = 0; in _dwc2_hcd_clear_tt_buffer_complete()