Lines Matching refs:ep
331 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_ring_ep_doorbell() local
332 unsigned int ep_state = ep->ep_state; in xhci_ring_ep_doorbell()
355 struct xhci_virt_ep *ep; in ring_doorbell_for_active_rings() local
357 ep = &xhci->devs[slot_id]->eps[ep_index]; in ring_doorbell_for_active_rings()
360 if (!(ep->ep_state & EP_HAS_STREAMS)) { in ring_doorbell_for_active_rings()
361 if (ep->ring && !(list_empty(&ep->ring->td_list))) in ring_doorbell_for_active_rings()
366 for (stream_id = 1; stream_id < ep->stream_info->num_streams; in ring_doorbell_for_active_rings()
368 struct xhci_stream_info *stream_info = ep->stream_info; in ring_doorbell_for_active_rings()
379 struct xhci_virt_ep *ep; in xhci_triad_to_transfer_ring() local
381 ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_triad_to_transfer_ring()
383 if (!(ep->ep_state & EP_HAS_STREAMS)) in xhci_triad_to_transfer_ring()
384 return ep->ring; in xhci_triad_to_transfer_ring()
394 if (stream_id < ep->stream_info->num_streams) in xhci_triad_to_transfer_ring()
395 return ep->stream_info->stream_rings[stream_id]; in xhci_triad_to_transfer_ring()
402 ep->stream_info->num_streams - 1, in xhci_triad_to_transfer_ring()
415 xhci_get_endpoint_index(&urb->ep->desc), urb->stream_id); in xhci_urb_to_transfer_ring()
442 struct xhci_virt_ep *ep = &dev->eps[ep_index]; in xhci_find_new_dequeue_state() local
464 if (ep->ep_state & EP_HAS_STREAMS) { in xhci_find_new_dequeue_state()
466 &ep->stream_info->stream_ctx_array[stream_id]; in xhci_find_new_dequeue_state()
502 if (new_deq == ep->ring->dequeue) { in xhci_find_new_dequeue_state()
584 struct xhci_virt_ep *ep) in xhci_stop_watchdog_timer_in_irq() argument
586 ep->ep_state &= ~EP_HALT_PENDING; in xhci_stop_watchdog_timer_in_irq()
591 if (del_timer(&ep->stop_cmd_timer)) in xhci_stop_watchdog_timer_in_irq()
592 ep->stop_cmds_pending--; in xhci_stop_watchdog_timer_in_irq()
641 struct xhci_virt_ep *ep; in xhci_handle_cmd_stop_ep() local
658 ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_handle_cmd_stop_ep()
660 if (list_empty(&ep->cancelled_td_list)) { in xhci_handle_cmd_stop_ep()
661 xhci_stop_watchdog_timer_in_irq(xhci, ep); in xhci_handle_cmd_stop_ep()
662 ep->stopped_td = NULL; in xhci_handle_cmd_stop_ep()
672 list_for_each(entry, &ep->cancelled_td_list) { in xhci_handle_cmd_stop_ep()
701 if (cur_td == ep->stopped_td) in xhci_handle_cmd_stop_ep()
716 xhci_stop_watchdog_timer_in_irq(xhci, ep); in xhci_handle_cmd_stop_ep()
721 ep->stopped_td->urb->stream_id, &deq_state); in xhci_handle_cmd_stop_ep()
728 ep->stopped_td = NULL; in xhci_handle_cmd_stop_ep()
737 cur_td = list_entry(ep->cancelled_td_list.next, in xhci_handle_cmd_stop_ep()
775 struct xhci_virt_ep *ep; in xhci_kill_endpoint_urbs() local
778 ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_kill_endpoint_urbs()
779 if ((ep->ep_state & EP_HAS_STREAMS) || in xhci_kill_endpoint_urbs()
780 (ep->ep_state & EP_GETTING_NO_STREAMS)) { in xhci_kill_endpoint_urbs()
783 for (stream_id = 0; stream_id < ep->stream_info->num_streams; in xhci_kill_endpoint_urbs()
789 ep->stream_info->stream_rings[stream_id]); in xhci_kill_endpoint_urbs()
792 ring = ep->ring; in xhci_kill_endpoint_urbs()
800 while (!list_empty(&ep->cancelled_td_list)) { in xhci_kill_endpoint_urbs()
801 cur_td = list_first_entry(&ep->cancelled_td_list, in xhci_kill_endpoint_urbs()
830 struct xhci_virt_ep *ep; in xhci_stop_endpoint_command_watchdog() local
834 ep = (struct xhci_virt_ep *) arg; in xhci_stop_endpoint_command_watchdog()
835 xhci = ep->xhci; in xhci_stop_endpoint_command_watchdog()
839 ep->stop_cmds_pending--; in xhci_stop_endpoint_command_watchdog()
847 if (!(ep->stop_cmds_pending == 0 && (ep->ep_state & EP_HALT_PENDING))) { in xhci_stop_endpoint_command_watchdog()
960 struct xhci_virt_ep *ep; in xhci_handle_cmd_set_deq() local
967 ep = &dev->eps[ep_index]; in xhci_handle_cmd_set_deq()
1016 if (ep->ep_state & EP_HAS_STREAMS) { in xhci_handle_cmd_set_deq()
1018 &ep->stream_info->stream_ctx_array[stream_id]; in xhci_handle_cmd_set_deq()
1025 if (xhci_trb_virt_to_dma(ep->queued_deq_seg, in xhci_handle_cmd_set_deq()
1026 ep->queued_deq_ptr) == deq) { in xhci_handle_cmd_set_deq()
1035 ep->queued_deq_seg, ep->queued_deq_ptr); in xhci_handle_cmd_set_deq()
1739 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_cleanup_halted_endpoint() local
1745 ep->ep_state |= EP_HALTED; in xhci_cleanup_halted_endpoint()
1746 ep->stopped_stream = stream_id; in xhci_cleanup_halted_endpoint()
1751 ep->stopped_stream = 0; in xhci_cleanup_halted_endpoint()
1803 struct xhci_virt_ep *ep, int *status, bool skip) in finish_td() argument
1818 ep_ring = xhci_dma_to_transfer_ring(ep, le64_to_cpu(event->buffer)); in finish_td()
1832 ep->stopped_td = td; in finish_td()
1898 struct xhci_virt_ep *ep, int *status) in process_ctrl_td() argument
1910 ep_ring = xhci_dma_to_transfer_ring(ep, le64_to_cpu(event->buffer)); in process_ctrl_td()
1941 return finish_td(xhci, td, event_trb, event, ep, status, false); in process_ctrl_td()
1950 return finish_td(xhci, td, event_trb, event, ep, status, false); in process_ctrl_td()
1969 return finish_td(xhci, td, event_trb, event, ep, status, false); in process_ctrl_td()
2008 return finish_td(xhci, td, event_trb, event, ep, status, false); in process_ctrl_td()
2016 struct xhci_virt_ep *ep, int *status) in process_isoc_td() argument
2028 ep_ring = xhci_dma_to_transfer_ring(ep, le64_to_cpu(event->buffer)); in process_isoc_td()
2101 return finish_td(xhci, td, event_trb, event, ep, status, false); in process_isoc_td()
2106 struct xhci_virt_ep *ep, int *status) in skip_isoc_td() argument
2113 ep_ring = xhci_dma_to_transfer_ring(ep, le64_to_cpu(event->buffer)); in skip_isoc_td()
2129 return finish_td(xhci, td, NULL, event, ep, status, true); in skip_isoc_td()
2137 struct xhci_virt_ep *ep, int *status) in process_bulk_intr_td() argument
2144 ep_ring = xhci_dma_to_transfer_ring(ep, le64_to_cpu(event->buffer)); in process_bulk_intr_td()
2178 td->urb->ep->desc.bEndpointAddress, in process_bulk_intr_td()
2248 return finish_td(xhci, td, event_trb, event, ep, status, false); in process_bulk_intr_td()
2262 struct xhci_virt_ep *ep; in handle_tx_event() local
2299 ep = &xdev->eps[ep_index]; in handle_tx_event()
2300 ep_ring = xhci_dma_to_transfer_ring(ep, le64_to_cpu(event->buffer)); in handle_tx_event()
2321 if (ep->skip) { in handle_tx_event()
2354 ep->ep_state |= EP_HALTED; in handle_tx_event()
2412 ep->skip = true; in handle_tx_event()
2416 ep->skip = true; in handle_tx_event()
2449 if (ep->skip) { in handle_tx_event()
2450 ep->skip = false; in handle_tx_event()
2459 if (ep->skip && td_num == 0) { in handle_tx_event()
2460 ep->skip = false; in handle_tx_event()
2468 if (ep->skip) in handle_tx_event()
2490 if (!ep->skip || in handle_tx_event()
2491 !usb_endpoint_xfer_isoc(&td->urb->ep->desc)) { in handle_tx_event()
2514 ret = skip_isoc_td(xhci, td, event, ep, &status); in handle_tx_event()
2522 if (ep->skip) { in handle_tx_event()
2524 ep->skip = false; in handle_tx_event()
2544 if (usb_endpoint_xfer_control(&td->urb->ep->desc)) in handle_tx_event()
2545 ret = process_ctrl_td(xhci, td, event_trb, event, ep, in handle_tx_event()
2547 else if (usb_endpoint_xfer_isoc(&td->urb->ep->desc)) in handle_tx_event()
2548 ret = process_isoc_td(xhci, td, event_trb, event, ep, in handle_tx_event()
2552 ep, &status); in handle_tx_event()
2557 handling_skipped_tds = ep->skip && in handle_tx_event()
2579 !usb_endpoint_xfer_isoc(&urb->ep->desc))) in handle_tx_event()
2978 urb->ep->desc.bEndpointAddress, num_trbs); in check_trb_math()
2983 urb->ep->desc.bEndpointAddress, in check_trb_math()
3071 maxp = GET_MAX_PACKET(usb_endpoint_maxp(&urb->ep->desc)); in xhci_td_remainder()
3111 usb_endpoint_maxp(&urb->ep->desc)); in queue_bulk_sg_tx()
3331 usb_endpoint_maxp(&urb->ep->desc)); in xhci_queue_bulk_tx()
3563 max_burst = urb->ep->ss_ep_comp.bMaxBurst; in xhci_get_burst_count()
3588 max_burst = urb->ep->ss_ep_comp.bMaxBurst; in xhci_get_last_burst_packet_count()
3739 usb_endpoint_maxp(&urb->ep->desc))); in xhci_queue_isoc_tx()
4127 struct xhci_virt_ep *ep; in xhci_queue_new_dequeue_state() local
4148 ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_new_dequeue_state()
4149 if ((ep->ep_state & SET_DEQ_PENDING)) { in xhci_queue_new_dequeue_state()
4162 ep->queued_deq_seg = deq_state->new_deq_seg; in xhci_queue_new_dequeue_state()
4163 ep->queued_deq_ptr = deq_state->new_deq_ptr; in xhci_queue_new_dequeue_state()
4180 ep->ep_state |= SET_DEQ_PENDING; in xhci_queue_new_dequeue_state()