Lines Matching refs:ep_index
1169 unsigned int xhci_get_endpoint_address(unsigned int ep_index) in xhci_get_endpoint_address() argument
1171 unsigned int number = DIV_ROUND_UP(ep_index, 2); in xhci_get_endpoint_address()
1172 unsigned int direction = ep_index % 2 ? USB_DIR_OUT : USB_DIR_IN; in xhci_get_endpoint_address()
1189 unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index) in xhci_get_endpoint_flag_from_index() argument
1191 return 1 << (ep_index + 1); in xhci_get_endpoint_flag_from_index()
1256 unsigned int ep_index, struct urb *urb) in xhci_check_maxpacket() argument
1267 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_check_maxpacket()
1301 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_check_maxpacket()
1303 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_check_maxpacket()
1311 xhci_dbg_ctx(xhci, command->in_ctx, ep_index); in xhci_check_maxpacket()
1313 xhci_dbg_ctx(xhci, out_ctx, ep_index); in xhci_check_maxpacket()
1339 unsigned int slot_id, ep_index; in xhci_urb_enqueue() local
1348 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_enqueue()
1393 ep_index, urb); in xhci_urb_enqueue()
1408 slot_id, ep_index); in xhci_urb_enqueue()
1416 if (xhci->devs[slot_id]->eps[ep_index].ep_state & in xhci_urb_enqueue()
1421 } else if (xhci->devs[slot_id]->eps[ep_index].ep_state & in xhci_urb_enqueue()
1429 slot_id, ep_index); in xhci_urb_enqueue()
1439 slot_id, ep_index); in xhci_urb_enqueue()
1448 slot_id, ep_index); in xhci_urb_enqueue()
1475 unsigned int ep_index; in xhci_urb_to_transfer_ring() local
1480 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_to_transfer_ring()
1482 ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_urb_to_transfer_ring()
1491 slot_id, ep_index); in xhci_urb_to_transfer_ring()
1502 slot_id, ep_index, in xhci_urb_to_transfer_ring()
1547 unsigned int ep_index; in xhci_urb_dequeue() local
1593 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_dequeue()
1594 ep = &xhci->devs[urb->dev->slot_id]->eps[ep_index]; in xhci_urb_dequeue()
1633 ep_index, 0); in xhci_urb_dequeue()
1660 unsigned int ep_index; in xhci_drop_endpoint() local
1690 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_drop_endpoint()
1691 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_drop_endpoint()
1700 if (xhci->devs[udev->slot_id]->eps[ep_index].ring != NULL) in xhci_drop_endpoint()
1740 unsigned int ep_index; in xhci_add_endpoint() local
1777 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_add_endpoint()
1781 if (virt_dev->eps[ep_index].ring && in xhci_add_endpoint()
2896 unsigned int slot_id, unsigned int ep_index, in xhci_setup_input_ctx_for_quirk() argument
2914 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_setup_input_ctx_for_quirk()
2915 ep_ctx = xhci_get_ep_ctx(xhci, in_ctx, ep_index); in xhci_setup_input_ctx_for_quirk()
2928 added_ctxs = xhci_get_endpoint_flag_from_index(ep_index); in xhci_setup_input_ctx_for_quirk()
2935 unsigned int ep_index, struct xhci_td *td) in xhci_cleanup_stalled_ring() argument
2943 ep = &xhci->devs[udev->slot_id]->eps[ep_index]; in xhci_cleanup_stalled_ring()
2948 ep_index, ep->stopped_stream, td, &deq_state); in xhci_cleanup_stalled_ring()
2960 ep_index, ep->stopped_stream, &deq_state); in xhci_cleanup_stalled_ring()
2971 ep_index, &deq_state); in xhci_cleanup_stalled_ring()
3009 unsigned int ep_index; in xhci_check_streams_endpoint() local
3024 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_check_streams_endpoint()
3025 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_check_streams_endpoint()
3035 if (!list_empty(&xhci->devs[slot_id]->eps[ep_index].ring->td_list)) { in xhci_check_streams_endpoint()
3108 unsigned int ep_index; in xhci_calculate_no_streams_bitmask() local
3117 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_calculate_no_streams_bitmask()
3118 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_calculate_no_streams_bitmask()
3168 unsigned int ep_index; in xhci_alloc_streams() local
3228 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3229 vdev->eps[ep_index].ep_state |= EP_GETTING_STREAMS; in xhci_alloc_streams()
3242 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3243 vdev->eps[ep_index].stream_info = xhci_alloc_stream_info(xhci, in xhci_alloc_streams()
3246 if (!vdev->eps[ep_index].stream_info) in xhci_alloc_streams()
3257 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3258 ep_ctx = xhci_get_ep_ctx(xhci, config_cmd->in_ctx, ep_index); in xhci_alloc_streams()
3261 vdev->out_ctx, ep_index); in xhci_alloc_streams()
3263 vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3285 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3286 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3288 udev->slot_id, ep_index); in xhci_alloc_streams()
3289 vdev->eps[ep_index].ep_state |= EP_HAS_STREAMS; in xhci_alloc_streams()
3300 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3301 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3302 vdev->eps[ep_index].stream_info = NULL; in xhci_alloc_streams()
3306 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3307 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_alloc_streams()
3329 unsigned int ep_index; in xhci_free_streams() local
3349 ep_index = xhci_get_endpoint_index(&eps[0]->desc); in xhci_free_streams()
3350 command = vdev->eps[ep_index].stream_info->free_streams_command; in xhci_free_streams()
3362 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3363 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_free_streams()
3364 xhci->devs[udev->slot_id]->eps[ep_index].ep_state |= in xhci_free_streams()
3368 vdev->out_ctx, ep_index); in xhci_free_streams()
3370 &vdev->eps[ep_index]); in xhci_free_streams()
3391 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3392 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_free_streams()
3393 vdev->eps[ep_index].stream_info = NULL; in xhci_free_streams()
3397 vdev->eps[ep_index].ep_state &= ~EP_GETTING_NO_STREAMS; in xhci_free_streams()
3398 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_free_streams()