Lines Matching refs:ep_index
1393 static unsigned int xhci_get_endpoint_address(unsigned int ep_index) in xhci_get_endpoint_address() argument
1395 unsigned int number = DIV_ROUND_UP(ep_index, 2); in xhci_get_endpoint_address()
1396 unsigned int direction = ep_index % 2 ? USB_DIR_OUT : USB_DIR_IN; in xhci_get_endpoint_address()
1548 unsigned int slot_id, ep_index; in xhci_urb_enqueue() local
1553 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_enqueue()
1604 ep_state = &xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_urb_enqueue()
1622 slot_id, ep_index); in xhci_urb_enqueue()
1626 slot_id, ep_index); in xhci_urb_enqueue()
1630 slot_id, ep_index); in xhci_urb_enqueue()
1634 slot_id, ep_index); in xhci_urb_enqueue()
1685 unsigned int ep_index; in xhci_urb_dequeue() local
1707 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_dequeue()
1708 ep = &vdev->eps[ep_index]; in xhci_urb_dequeue()
1782 ep_index, 0); in xhci_urb_dequeue()
1817 unsigned int ep_index; in xhci_drop_endpoint() local
1847 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_drop_endpoint()
1848 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_drop_endpoint()
1856 if (xhci->devs[udev->slot_id]->eps[ep_index].ring != NULL) in xhci_drop_endpoint()
1868 xhci_debugfs_remove_endpoint(xhci, xhci->devs[udev->slot_id], ep_index); in xhci_drop_endpoint()
1899 unsigned int ep_index; in xhci_add_endpoint() local
1937 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_add_endpoint()
1941 if (virt_dev->eps[ep_index].ring && in xhci_add_endpoint()
1983 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); in xhci_add_endpoint()
3065 unsigned int ep_index; in xhci_endpoint_disable() local
3079 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_disable()
3080 ep = &vdev->eps[ep_index]; in xhci_endpoint_disable()
3121 unsigned int ep_index; in xhci_endpoint_reset() local
3127 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_reset()
3134 if (usb_endpoint_xfer_control(&host_ep->desc) && ep_index == 0) { in xhci_endpoint_reset()
3158 ep = &vdev->eps[ep_index]; in xhci_endpoint_reset()
3205 ep_index, 0); in xhci_endpoint_reset()
3233 xhci_endpoint_copy(xhci, cfg_cmd->in_ctx, vdev->out_ctx, ep_index); in xhci_endpoint_reset()
3264 unsigned int ep_index; in xhci_check_streams_endpoint() local
3279 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_check_streams_endpoint()
3280 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_check_streams_endpoint()
3290 if (!list_empty(&xhci->devs[slot_id]->eps[ep_index].ring->td_list)) { in xhci_check_streams_endpoint()
3363 unsigned int ep_index; in xhci_calculate_no_streams_bitmask() local
3372 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_calculate_no_streams_bitmask()
3373 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_calculate_no_streams_bitmask()
3423 unsigned int ep_index; in xhci_alloc_streams() local
3483 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3484 vdev->eps[ep_index].ep_state |= EP_GETTING_STREAMS; in xhci_alloc_streams()
3497 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3499 vdev->eps[ep_index].stream_info = xhci_alloc_stream_info(xhci, in xhci_alloc_streams()
3503 if (!vdev->eps[ep_index].stream_info) in xhci_alloc_streams()
3514 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3515 ep_ctx = xhci_get_ep_ctx(xhci, config_cmd->in_ctx, ep_index); in xhci_alloc_streams()
3518 vdev->out_ctx, ep_index); in xhci_alloc_streams()
3520 vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3542 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3543 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3545 udev->slot_id, ep_index); in xhci_alloc_streams()
3546 vdev->eps[ep_index].ep_state |= EP_HAS_STREAMS; in xhci_alloc_streams()
3552 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3553 xhci_debugfs_create_stream_files(xhci, vdev, ep_index); in xhci_alloc_streams()
3561 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3562 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3563 vdev->eps[ep_index].stream_info = NULL; in xhci_alloc_streams()
3567 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3568 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_alloc_streams()
3590 unsigned int ep_index; in xhci_free_streams() local
3610 ep_index = xhci_get_endpoint_index(&eps[0]->desc); in xhci_free_streams()
3611 command = vdev->eps[ep_index].stream_info->free_streams_command; in xhci_free_streams()
3623 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3624 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_free_streams()
3625 xhci->devs[udev->slot_id]->eps[ep_index].ep_state |= in xhci_free_streams()
3629 vdev->out_ctx, ep_index); in xhci_free_streams()
3631 &vdev->eps[ep_index]); in xhci_free_streams()
3652 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3653 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_free_streams()
3654 vdev->eps[ep_index].stream_info = NULL; in xhci_free_streams()
3658 vdev->eps[ep_index].ep_state &= ~EP_GETTING_NO_STREAMS; in xhci_free_streams()
3659 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_free_streams()
5321 unsigned int ep_index; in xhci_clear_tt_buffer_complete() local
5329 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_clear_tt_buffer_complete()
5331 xhci->devs[slot_id]->eps[ep_index].ep_state &= ~EP_CLEARING_TT; in xhci_clear_tt_buffer_complete()
5332 xhci_ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_clear_tt_buffer_complete()