Lines Matching refs:ep_index
1248 unsigned int xhci_get_endpoint_address(unsigned int ep_index) in xhci_get_endpoint_address() argument
1250 unsigned int number = DIV_ROUND_UP(ep_index, 2); in xhci_get_endpoint_address()
1251 unsigned int direction = ep_index % 2 ? USB_DIR_OUT : USB_DIR_IN; in xhci_get_endpoint_address()
1268 static unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index) in xhci_get_endpoint_flag_from_index() argument
1270 return 1 << (ep_index + 1); in xhci_get_endpoint_flag_from_index()
1335 unsigned int ep_index, struct urb *urb) in xhci_check_maxpacket() argument
1346 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_check_maxpacket()
1380 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_check_maxpacket()
1382 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_check_maxpacket()
1412 unsigned int slot_id, ep_index; in xhci_urb_enqueue() local
1422 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_enqueue()
1423 ep_state = &xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_urb_enqueue()
1458 ep_index, urb); in xhci_urb_enqueue()
1491 slot_id, ep_index); in xhci_urb_enqueue()
1495 slot_id, ep_index); in xhci_urb_enqueue()
1499 slot_id, ep_index); in xhci_urb_enqueue()
1503 slot_id, ep_index); in xhci_urb_enqueue()
1554 unsigned int ep_index; in xhci_urb_dequeue() local
1576 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_dequeue()
1577 ep = &vdev->eps[ep_index]; in xhci_urb_dequeue()
1649 ep_index, 0); in xhci_urb_dequeue()
1684 unsigned int ep_index; in xhci_drop_endpoint() local
1714 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_drop_endpoint()
1715 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_drop_endpoint()
1723 if (xhci->devs[udev->slot_id]->eps[ep_index].ring != NULL) in xhci_drop_endpoint()
1735 xhci_debugfs_remove_endpoint(xhci, xhci->devs[udev->slot_id], ep_index); in xhci_drop_endpoint()
1768 unsigned int ep_index; in xhci_add_endpoint() local
1805 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_add_endpoint()
1809 if (virt_dev->eps[ep_index].ring && in xhci_add_endpoint()
1840 xhci_ring_free(xhci, virt_dev->eps[ep_index].new_ring); in xhci_add_endpoint()
1841 virt_dev->eps[ep_index].new_ring = NULL; in xhci_add_endpoint()
1860 xhci_debugfs_create_endpoint(xhci, virt_dev, ep_index); in xhci_add_endpoint()
2937 unsigned int slot_id, unsigned int ep_index, in xhci_setup_input_ctx_for_quirk() argument
2955 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_setup_input_ctx_for_quirk()
2956 ep_ctx = xhci_get_ep_ctx(xhci, in_ctx, ep_index); in xhci_setup_input_ctx_for_quirk()
2969 added_ctxs = xhci_get_endpoint_flag_from_index(ep_index); in xhci_setup_input_ctx_for_quirk()
2975 void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, unsigned int ep_index, in xhci_cleanup_stalled_ring() argument
2987 ep_index, stream_id, td, &deq_state); in xhci_cleanup_stalled_ring()
2999 ep_index, &deq_state); in xhci_cleanup_stalled_ring()
3010 ep_index, &deq_state); in xhci_cleanup_stalled_ring()
3035 unsigned int ep_index; in xhci_endpoint_reset() local
3044 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_reset()
3045 ep = &vdev->eps[ep_index]; in xhci_endpoint_reset()
3087 xhci_queue_stop_endpoint(xhci, stop_cmd, udev->slot_id, ep_index, 0); in xhci_endpoint_reset()
3099 xhci_endpoint_copy(xhci, cfg_cmd->in_ctx, vdev->out_ctx, ep_index); in xhci_endpoint_reset()
3119 unsigned int ep_index; in xhci_check_streams_endpoint() local
3134 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_check_streams_endpoint()
3135 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_check_streams_endpoint()
3145 if (!list_empty(&xhci->devs[slot_id]->eps[ep_index].ring->td_list)) { in xhci_check_streams_endpoint()
3218 unsigned int ep_index; in xhci_calculate_no_streams_bitmask() local
3227 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_calculate_no_streams_bitmask()
3228 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_calculate_no_streams_bitmask()
3278 unsigned int ep_index; in xhci_alloc_streams() local
3338 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3339 vdev->eps[ep_index].ep_state |= EP_GETTING_STREAMS; in xhci_alloc_streams()
3352 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3354 vdev->eps[ep_index].stream_info = xhci_alloc_stream_info(xhci, in xhci_alloc_streams()
3358 if (!vdev->eps[ep_index].stream_info) in xhci_alloc_streams()
3369 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3370 ep_ctx = xhci_get_ep_ctx(xhci, config_cmd->in_ctx, ep_index); in xhci_alloc_streams()
3373 vdev->out_ctx, ep_index); in xhci_alloc_streams()
3375 vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3397 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3398 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3400 udev->slot_id, ep_index); in xhci_alloc_streams()
3401 vdev->eps[ep_index].ep_state |= EP_HAS_STREAMS; in xhci_alloc_streams()
3412 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3413 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3414 vdev->eps[ep_index].stream_info = NULL; in xhci_alloc_streams()
3418 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3419 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_alloc_streams()
3441 unsigned int ep_index; in xhci_free_streams() local
3461 ep_index = xhci_get_endpoint_index(&eps[0]->desc); in xhci_free_streams()
3462 command = vdev->eps[ep_index].stream_info->free_streams_command; in xhci_free_streams()
3474 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3475 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_free_streams()
3476 xhci->devs[udev->slot_id]->eps[ep_index].ep_state |= in xhci_free_streams()
3480 vdev->out_ctx, ep_index); in xhci_free_streams()
3482 &vdev->eps[ep_index]); in xhci_free_streams()
3503 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3504 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_free_streams()
3505 vdev->eps[ep_index].stream_info = NULL; in xhci_free_streams()
3509 vdev->eps[ep_index].ep_state &= ~EP_GETTING_NO_STREAMS; in xhci_free_streams()
3510 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_free_streams()