Lines Matching refs:ep_index

1301 unsigned int xhci_get_endpoint_address(unsigned int ep_index)  in xhci_get_endpoint_address()  argument
1303 unsigned int number = DIV_ROUND_UP(ep_index, 2); in xhci_get_endpoint_address()
1304 unsigned int direction = ep_index % 2 ? USB_DIR_OUT : USB_DIR_IN; in xhci_get_endpoint_address()
1321 static unsigned int xhci_get_endpoint_flag_from_index(unsigned int ep_index) in xhci_get_endpoint_flag_from_index() argument
1323 return 1 << (ep_index + 1); in xhci_get_endpoint_flag_from_index()
1388 unsigned int ep_index, struct urb *urb) in xhci_check_maxpacket() argument
1399 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_check_maxpacket()
1433 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_check_maxpacket()
1435 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_check_maxpacket()
1466 unsigned int slot_id, ep_index; in xhci_urb_enqueue() local
1476 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_enqueue()
1477 ep_state = &xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_urb_enqueue()
1515 ep_index, urb); in xhci_urb_enqueue()
1548 slot_id, ep_index); in xhci_urb_enqueue()
1552 slot_id, ep_index); in xhci_urb_enqueue()
1556 slot_id, ep_index); in xhci_urb_enqueue()
1560 slot_id, ep_index); in xhci_urb_enqueue()
1611 unsigned int ep_index; in xhci_urb_dequeue() local
1633 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_dequeue()
1634 ep = &vdev->eps[ep_index]; in xhci_urb_dequeue()
1706 ep_index, 0); in xhci_urb_dequeue()
1741 unsigned int ep_index; in xhci_drop_endpoint() local
1771 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_drop_endpoint()
1772 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_drop_endpoint()
1780 if (xhci->devs[udev->slot_id]->eps[ep_index].ring != NULL) in xhci_drop_endpoint()
1792 xhci_debugfs_remove_endpoint(xhci, xhci->devs[udev->slot_id], ep_index); in xhci_drop_endpoint()
1825 unsigned int ep_index; in xhci_add_endpoint() local
1863 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_add_endpoint()
1867 if (virt_dev->eps[ep_index].ring && in xhci_add_endpoint()
1898 xhci_ring_free(xhci, virt_dev->eps[ep_index].new_ring); in xhci_add_endpoint()
1899 virt_dev->eps[ep_index].new_ring = NULL; in xhci_add_endpoint()
1918 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); in xhci_add_endpoint()
2999 unsigned int slot_id, unsigned int ep_index, in xhci_setup_input_ctx_for_quirk() argument
3017 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_setup_input_ctx_for_quirk()
3018 ep_ctx = xhci_get_ep_ctx(xhci, in_ctx, ep_index); in xhci_setup_input_ctx_for_quirk()
3031 added_ctxs = xhci_get_endpoint_flag_from_index(ep_index); in xhci_setup_input_ctx_for_quirk()
3038 unsigned int ep_index, unsigned int stream_id, in xhci_cleanup_stalled_ring() argument
3048 xhci_find_new_dequeue_state(xhci, slot_id, ep_index, stream_id, td, in xhci_cleanup_stalled_ring()
3061 ep_index, &deq_state); in xhci_cleanup_stalled_ring()
3072 ep_index, &deq_state); in xhci_cleanup_stalled_ring()
3084 unsigned int ep_index; in xhci_endpoint_disable() local
3098 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_disable()
3099 ep = &vdev->eps[ep_index]; in xhci_endpoint_disable()
3139 unsigned int ep_index; in xhci_endpoint_reset() local
3157 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_reset()
3158 ep = &vdev->eps[ep_index]; in xhci_endpoint_reset()
3204 ep_index, 0); in xhci_endpoint_reset()
3224 xhci_endpoint_copy(xhci, cfg_cmd->in_ctx, vdev->out_ctx, ep_index); in xhci_endpoint_reset()
3253 unsigned int ep_index; in xhci_check_streams_endpoint() local
3268 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_check_streams_endpoint()
3269 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_check_streams_endpoint()
3279 if (!list_empty(&xhci->devs[slot_id]->eps[ep_index].ring->td_list)) { in xhci_check_streams_endpoint()
3352 unsigned int ep_index; in xhci_calculate_no_streams_bitmask() local
3361 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_calculate_no_streams_bitmask()
3362 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_calculate_no_streams_bitmask()
3412 unsigned int ep_index; in xhci_alloc_streams() local
3472 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3473 vdev->eps[ep_index].ep_state |= EP_GETTING_STREAMS; in xhci_alloc_streams()
3486 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3488 vdev->eps[ep_index].stream_info = xhci_alloc_stream_info(xhci, in xhci_alloc_streams()
3492 if (!vdev->eps[ep_index].stream_info) in xhci_alloc_streams()
3503 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3504 ep_ctx = xhci_get_ep_ctx(xhci, config_cmd->in_ctx, ep_index); in xhci_alloc_streams()
3507 vdev->out_ctx, ep_index); in xhci_alloc_streams()
3509 vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3531 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3532 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3534 udev->slot_id, ep_index); in xhci_alloc_streams()
3535 vdev->eps[ep_index].ep_state |= EP_HAS_STREAMS; in xhci_alloc_streams()
3541 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3542 xhci_debugfs_create_stream_files(xhci, vdev, ep_index); in xhci_alloc_streams()
3550 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3551 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3552 vdev->eps[ep_index].stream_info = NULL; in xhci_alloc_streams()
3556 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3557 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_alloc_streams()
3579 unsigned int ep_index; in xhci_free_streams() local
3599 ep_index = xhci_get_endpoint_index(&eps[0]->desc); in xhci_free_streams()
3600 command = vdev->eps[ep_index].stream_info->free_streams_command; in xhci_free_streams()
3612 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3613 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_free_streams()
3614 xhci->devs[udev->slot_id]->eps[ep_index].ep_state |= in xhci_free_streams()
3618 vdev->out_ctx, ep_index); in xhci_free_streams()
3620 &vdev->eps[ep_index]); in xhci_free_streams()
3641 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3642 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_free_streams()
3643 vdev->eps[ep_index].stream_info = NULL; in xhci_free_streams()
3647 vdev->eps[ep_index].ep_state &= ~EP_GETTING_NO_STREAMS; in xhci_free_streams()
3648 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_free_streams()
5293 unsigned int ep_index; in xhci_clear_tt_buffer_complete() local
5301 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_clear_tt_buffer_complete()
5303 xhci->devs[slot_id]->eps[ep_index].ep_state &= ~EP_CLEARING_TT; in xhci_clear_tt_buffer_complete()
5304 xhci_ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_clear_tt_buffer_complete()