Lines Matching refs:ep_index

1299 unsigned int xhci_get_endpoint_address(unsigned int ep_index)  in xhci_get_endpoint_address()  argument
1301 unsigned int number = DIV_ROUND_UP(ep_index, 2); in xhci_get_endpoint_address()
1302 unsigned int direction = ep_index % 2 ? USB_DIR_OUT : USB_DIR_IN; in xhci_get_endpoint_address()
1319 static unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index) in xhci_get_endpoint_flag_from_index() argument
1321 return 1 << (ep_index + 1); in xhci_get_endpoint_flag_from_index()
1386 unsigned int ep_index, struct urb *urb) in xhci_check_maxpacket() argument
1397 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_check_maxpacket()
1431 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_check_maxpacket()
1433 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_check_maxpacket()
1463 unsigned int slot_id, ep_index; in xhci_urb_enqueue() local
1473 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_enqueue()
1474 ep_state = &xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_urb_enqueue()
1512 ep_index, urb); in xhci_urb_enqueue()
1545 slot_id, ep_index); in xhci_urb_enqueue()
1549 slot_id, ep_index); in xhci_urb_enqueue()
1553 slot_id, ep_index); in xhci_urb_enqueue()
1557 slot_id, ep_index); in xhci_urb_enqueue()
1608 unsigned int ep_index; in xhci_urb_dequeue() local
1630 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_dequeue()
1631 ep = &vdev->eps[ep_index]; in xhci_urb_dequeue()
1703 ep_index, 0); in xhci_urb_dequeue()
1738 unsigned int ep_index; in xhci_drop_endpoint() local
1768 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_drop_endpoint()
1769 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_drop_endpoint()
1777 if (xhci->devs[udev->slot_id]->eps[ep_index].ring != NULL) in xhci_drop_endpoint()
1789 xhci_debugfs_remove_endpoint(xhci, xhci->devs[udev->slot_id], ep_index); in xhci_drop_endpoint()
1822 unsigned int ep_index; in xhci_add_endpoint() local
1860 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_add_endpoint()
1864 if (virt_dev->eps[ep_index].ring && in xhci_add_endpoint()
1895 xhci_ring_free(xhci, virt_dev->eps[ep_index].new_ring); in xhci_add_endpoint()
1896 virt_dev->eps[ep_index].new_ring = NULL; in xhci_add_endpoint()
1915 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); in xhci_add_endpoint()
1918 xhci_debugfs_create_endpoint(xhci, virt_dev, ep_index); in xhci_add_endpoint()
2997 unsigned int slot_id, unsigned int ep_index, in xhci_setup_input_ctx_for_quirk() argument
3015 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_setup_input_ctx_for_quirk()
3016 ep_ctx = xhci_get_ep_ctx(xhci, in_ctx, ep_index); in xhci_setup_input_ctx_for_quirk()
3029 added_ctxs = xhci_get_endpoint_flag_from_index(ep_index); in xhci_setup_input_ctx_for_quirk()
3035 void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, unsigned int ep_index, in xhci_cleanup_stalled_ring() argument
3047 ep_index, stream_id, td, &deq_state); in xhci_cleanup_stalled_ring()
3059 ep_index, &deq_state); in xhci_cleanup_stalled_ring()
3070 ep_index, &deq_state); in xhci_cleanup_stalled_ring()
3082 unsigned int ep_index; in xhci_endpoint_disable() local
3096 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_disable()
3097 ep = &vdev->eps[ep_index]; in xhci_endpoint_disable()
3137 unsigned int ep_index; in xhci_endpoint_reset() local
3155 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_reset()
3156 ep = &vdev->eps[ep_index]; in xhci_endpoint_reset()
3202 ep_index, 0); in xhci_endpoint_reset()
3222 xhci_endpoint_copy(xhci, cfg_cmd->in_ctx, vdev->out_ctx, ep_index); in xhci_endpoint_reset()
3250 unsigned int ep_index; in xhci_check_streams_endpoint() local
3265 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_check_streams_endpoint()
3266 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_check_streams_endpoint()
3276 if (!list_empty(&xhci->devs[slot_id]->eps[ep_index].ring->td_list)) { in xhci_check_streams_endpoint()
3349 unsigned int ep_index; in xhci_calculate_no_streams_bitmask() local
3358 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_calculate_no_streams_bitmask()
3359 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_calculate_no_streams_bitmask()
3409 unsigned int ep_index; in xhci_alloc_streams() local
3469 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3470 vdev->eps[ep_index].ep_state |= EP_GETTING_STREAMS; in xhci_alloc_streams()
3483 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3485 vdev->eps[ep_index].stream_info = xhci_alloc_stream_info(xhci, in xhci_alloc_streams()
3489 if (!vdev->eps[ep_index].stream_info) in xhci_alloc_streams()
3500 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3501 ep_ctx = xhci_get_ep_ctx(xhci, config_cmd->in_ctx, ep_index); in xhci_alloc_streams()
3504 vdev->out_ctx, ep_index); in xhci_alloc_streams()
3506 vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3528 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3529 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3531 udev->slot_id, ep_index); in xhci_alloc_streams()
3532 vdev->eps[ep_index].ep_state |= EP_HAS_STREAMS; in xhci_alloc_streams()
3543 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3544 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3545 vdev->eps[ep_index].stream_info = NULL; in xhci_alloc_streams()
3549 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3550 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_alloc_streams()
3572 unsigned int ep_index; in xhci_free_streams() local
3592 ep_index = xhci_get_endpoint_index(&eps[0]->desc); in xhci_free_streams()
3593 command = vdev->eps[ep_index].stream_info->free_streams_command; in xhci_free_streams()
3605 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3606 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_free_streams()
3607 xhci->devs[udev->slot_id]->eps[ep_index].ep_state |= in xhci_free_streams()
3611 vdev->out_ctx, ep_index); in xhci_free_streams()
3613 &vdev->eps[ep_index]); in xhci_free_streams()
3634 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3635 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_free_streams()
3636 vdev->eps[ep_index].stream_info = NULL; in xhci_free_streams()
3640 vdev->eps[ep_index].ep_state &= ~EP_GETTING_NO_STREAMS; in xhci_free_streams()
3641 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_free_streams()
5280 unsigned int ep_index; in xhci_clear_tt_buffer_complete() local
5288 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_clear_tt_buffer_complete()
5290 xhci->devs[slot_id]->eps[ep_index].ep_state &= ~EP_CLEARING_TT; in xhci_clear_tt_buffer_complete()
5291 xhci_ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_clear_tt_buffer_complete()