Lines Matching refs:ep_index
1338 unsigned int xhci_get_endpoint_address(unsigned int ep_index) in xhci_get_endpoint_address() argument
1340 unsigned int number = DIV_ROUND_UP(ep_index, 2); in xhci_get_endpoint_address()
1341 unsigned int direction = ep_index % 2 ? USB_DIR_OUT : USB_DIR_IN; in xhci_get_endpoint_address()
1416 unsigned int ep_index, struct urb *urb, gfp_t mem_flags) in xhci_check_maxpacket() argument
1427 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_check_maxpacket()
1461 xhci->devs[slot_id]->out_ctx, ep_index); in xhci_check_maxpacket()
1463 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_check_maxpacket()
1494 unsigned int slot_id, ep_index; in xhci_urb_enqueue() local
1507 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_enqueue()
1508 ep_state = &xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_urb_enqueue()
1551 ep_index, urb, mem_flags); in xhci_urb_enqueue()
1584 slot_id, ep_index); in xhci_urb_enqueue()
1588 slot_id, ep_index); in xhci_urb_enqueue()
1592 slot_id, ep_index); in xhci_urb_enqueue()
1596 slot_id, ep_index); in xhci_urb_enqueue()
1647 unsigned int ep_index; in xhci_urb_dequeue() local
1669 ep_index = xhci_get_endpoint_index(&urb->ep->desc); in xhci_urb_dequeue()
1670 ep = &vdev->eps[ep_index]; in xhci_urb_dequeue()
1747 ep_index, 0); in xhci_urb_dequeue()
1782 unsigned int ep_index; in xhci_drop_endpoint() local
1812 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_drop_endpoint()
1813 ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index); in xhci_drop_endpoint()
1821 if (xhci->devs[udev->slot_id]->eps[ep_index].ring != NULL) in xhci_drop_endpoint()
1833 xhci_debugfs_remove_endpoint(xhci, xhci->devs[udev->slot_id], ep_index); in xhci_drop_endpoint()
1864 unsigned int ep_index; in xhci_add_endpoint() local
1902 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_add_endpoint()
1906 if (virt_dev->eps[ep_index].ring && in xhci_add_endpoint()
1948 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); in xhci_add_endpoint()
3051 unsigned int ep_index; in xhci_endpoint_disable() local
3065 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_disable()
3066 ep = &vdev->eps[ep_index]; in xhci_endpoint_disable()
3106 unsigned int ep_index; in xhci_endpoint_reset() local
3124 ep_index = xhci_get_endpoint_index(&host_ep->desc); in xhci_endpoint_reset()
3125 ep = &vdev->eps[ep_index]; in xhci_endpoint_reset()
3174 ep_index, 0); in xhci_endpoint_reset()
3209 xhci_endpoint_copy(xhci, cfg_cmd->in_ctx, vdev->out_ctx, ep_index); in xhci_endpoint_reset()
3245 unsigned int ep_index; in xhci_check_streams_endpoint() local
3260 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_check_streams_endpoint()
3261 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_check_streams_endpoint()
3271 if (!list_empty(&xhci->devs[slot_id]->eps[ep_index].ring->td_list)) { in xhci_check_streams_endpoint()
3344 unsigned int ep_index; in xhci_calculate_no_streams_bitmask() local
3353 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_calculate_no_streams_bitmask()
3354 ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state; in xhci_calculate_no_streams_bitmask()
3404 unsigned int ep_index; in xhci_alloc_streams() local
3464 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3465 vdev->eps[ep_index].ep_state |= EP_GETTING_STREAMS; in xhci_alloc_streams()
3478 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3480 vdev->eps[ep_index].stream_info = xhci_alloc_stream_info(xhci, in xhci_alloc_streams()
3484 if (!vdev->eps[ep_index].stream_info) in xhci_alloc_streams()
3495 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3496 ep_ctx = xhci_get_ep_ctx(xhci, config_cmd->in_ctx, ep_index); in xhci_alloc_streams()
3499 vdev->out_ctx, ep_index); in xhci_alloc_streams()
3501 vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3523 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3524 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3526 udev->slot_id, ep_index); in xhci_alloc_streams()
3527 vdev->eps[ep_index].ep_state |= EP_HAS_STREAMS; in xhci_alloc_streams()
3533 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3534 xhci_debugfs_create_stream_files(xhci, vdev, ep_index); in xhci_alloc_streams()
3542 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_alloc_streams()
3543 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_alloc_streams()
3544 vdev->eps[ep_index].stream_info = NULL; in xhci_alloc_streams()
3548 vdev->eps[ep_index].ep_state &= ~EP_GETTING_STREAMS; in xhci_alloc_streams()
3549 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_alloc_streams()
3571 unsigned int ep_index; in xhci_free_streams() local
3591 ep_index = xhci_get_endpoint_index(&eps[0]->desc); in xhci_free_streams()
3592 command = vdev->eps[ep_index].stream_info->free_streams_command; in xhci_free_streams()
3604 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3605 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_free_streams()
3606 xhci->devs[udev->slot_id]->eps[ep_index].ep_state |= in xhci_free_streams()
3610 vdev->out_ctx, ep_index); in xhci_free_streams()
3612 &vdev->eps[ep_index]); in xhci_free_streams()
3633 ep_index = xhci_get_endpoint_index(&eps[i]->desc); in xhci_free_streams()
3634 xhci_free_stream_info(xhci, vdev->eps[ep_index].stream_info); in xhci_free_streams()
3635 vdev->eps[ep_index].stream_info = NULL; in xhci_free_streams()
3639 vdev->eps[ep_index].ep_state &= ~EP_GETTING_NO_STREAMS; in xhci_free_streams()
3640 vdev->eps[ep_index].ep_state &= ~EP_HAS_STREAMS; in xhci_free_streams()
5353 unsigned int ep_index; in xhci_clear_tt_buffer_complete() local
5361 ep_index = xhci_get_endpoint_index(&ep->desc); in xhci_clear_tt_buffer_complete()
5363 xhci->devs[slot_id]->eps[ep_index].ep_state &= ~EP_CLEARING_TT; in xhci_clear_tt_buffer_complete()
5364 xhci_ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_clear_tt_buffer_complete()