Lines Matching refs:ep_index

482 		unsigned int ep_index,  in xhci_ring_ep_doorbell()  argument
486 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_ring_ep_doorbell()
499 trace_xhci_ring_ep_doorbell(slot_id, DB_VALUE(ep_index, stream_id)); in xhci_ring_ep_doorbell()
501 writel(DB_VALUE(ep_index, stream_id), db_addr); in xhci_ring_ep_doorbell()
509 unsigned int ep_index) in ring_doorbell_for_active_rings() argument
514 ep = &xhci->devs[slot_id]->eps[ep_index]; in ring_doorbell_for_active_rings()
519 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0); in ring_doorbell_for_active_rings()
527 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, in ring_doorbell_for_active_rings()
534 unsigned int ep_index) in xhci_ring_doorbell_for_active_rings() argument
536 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_ring_doorbell_for_active_rings()
541 unsigned int ep_index) in xhci_get_virt_ep() argument
547 if (ep_index >= EP_CTX_PER_DEV) { in xhci_get_virt_ep()
548 xhci_warn(xhci, "Invalid endpoint index %u\n", ep_index); in xhci_get_virt_ep()
556 return &xhci->devs[slot_id]->eps[ep_index]; in xhci_get_virt_ep()
572 stream_id, ep->vdev->slot_id, ep->ep_index); in xhci_virt_ep_to_ring()
584 unsigned int slot_id, unsigned int ep_index, in xhci_triad_to_transfer_ring() argument
589 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_triad_to_transfer_ring()
604 unsigned int ep_index, unsigned int stream_id) in xhci_get_hw_deq() argument
610 ep = &vdev->eps[ep_index]; in xhci_get_hw_deq()
616 ep_ctx = xhci_get_ep_ctx(xhci, vdev->out_ctx, ep_index); in xhci_get_hw_deq()
621 unsigned int slot_id, unsigned int ep_index, in xhci_move_dequeue_past_td() argument
625 struct xhci_virt_ep *ep = &dev->eps[ep_index]; in xhci_move_dequeue_past_td()
639 ep_index, stream_id); in xhci_move_dequeue_past_td()
665 hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id); in xhci_move_dequeue_past_td()
729 EP_ID_FOR_TRB(ep_index) | TRB_TYPE(TRB_SET_DEQ), false); in xhci_move_dequeue_past_td()
906 unsigned int ep_index, enum xhci_ep_reset_type reset_type) in xhci_reset_halted_ep() argument
919 ep_index, slot_id); in xhci_reset_halted_ep()
921 ret = xhci_queue_reset_ep(xhci, command, slot_id, ep_index, reset_type); in xhci_reset_halted_ep()
925 slot_id, ep_index, ret); in xhci_reset_halted_ep()
955 ep->ep_index); in xhci_handle_halted_endpoint()
959 err = xhci_reset_halted_ep(xhci, slot_id, ep->ep_index, reset_type); in xhci_handle_halted_endpoint()
1011 hw_deq = xhci_get_hw_deq(xhci, ep->vdev, ep->ep_index, in xhci_invalidate_cancelled_tds()
1043 err = xhci_move_dequeue_past_td(xhci, slot_id, ep->ep_index, in xhci_invalidate_cancelled_tds()
1070 hw_deq = xhci_get_hw_deq(ep->xhci, ep->vdev, ep->ep_index, 0); in find_halted_td()
1093 unsigned int ep_index; in xhci_handle_cmd_stop_ep() local
1108 ep_index = TRB_TO_EP_INDEX(le32_to_cpu(trb->generic.field[3])); in xhci_handle_cmd_stop_ep()
1109 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
1113 ep_ctx = xhci_get_ep_ctx(xhci, ep->vdev->out_ctx, ep_index); in xhci_handle_cmd_stop_ep()
1158 xhci_queue_stop_endpoint(xhci, command, slot_id, ep_index, 0); in xhci_handle_cmd_stop_ep()
1173 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
1196 int slot_id, int ep_index) in xhci_kill_endpoint_urbs() argument
1203 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_kill_endpoint_urbs()
1219 slot_id, ep_index, stream_id); in xhci_kill_endpoint_urbs()
1228 slot_id, ep_index); in xhci_kill_endpoint_urbs()
1279 unsigned int ep_index) in update_ring_for_set_deq_completion() argument
1296 while (ep_ring->dequeue != dev->eps[ep_index].queued_deq_ptr) { in update_ring_for_set_deq_completion()
1301 dev->eps[ep_index].queued_deq_ptr) in update_ring_for_set_deq_completion()
1323 unsigned int ep_index; in xhci_handle_cmd_set_deq() local
1331 ep_index = TRB_TO_EP_INDEX(le32_to_cpu(trb->generic.field[3])); in xhci_handle_cmd_set_deq()
1333 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_set_deq()
1345 ep_ctx = xhci_get_ep_ctx(xhci, ep->vdev->out_ctx, ep_index); in xhci_handle_cmd_set_deq()
1400 ep_ring, ep_index); in xhci_handle_cmd_set_deq()
1426 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_set_deq()
1434 unsigned int ep_index; in xhci_handle_cmd_reset_ep() local
1436 ep_index = TRB_TO_EP_INDEX(le32_to_cpu(trb->generic.field[3])); in xhci_handle_cmd_reset_ep()
1437 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_reset_ep()
1441 ep_ctx = xhci_get_ep_ctx(xhci, ep->vdev->out_ctx, ep_index); in xhci_handle_cmd_reset_ep()
1460 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_reset_ep()
1495 unsigned int ep_index; in xhci_handle_cmd_config_ep() local
1515 ep_index = xhci_last_valid_endpoint(add_flags) - 1; in xhci_handle_cmd_config_ep()
1517 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->out_ctx, ep_index); in xhci_handle_cmd_config_ep()
2166 ep_ctx = xhci_get_ep_ctx(xhci, ep->vdev->out_ctx, ep->ep_index); in finish_td()
2223 if (ep->ep_index != 0) in finish_td()
2269 ep_ctx = xhci_get_ep_ctx(xhci, ep->vdev->out_ctx, ep->ep_index); in process_ctrl_td()
2317 trb_comp_code, ep->ep_index); in process_ctrl_td()
2548 int ep_index; in handle_tx_event() local
2560 ep_index = TRB_TO_EP_ID(le32_to_cpu(event->flags)) - 1; in handle_tx_event()
2564 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in handle_tx_event()
2571 ep_ctx = xhci_get_ep_ctx(xhci, ep->vdev->out_ctx, ep_index); in handle_tx_event()
2576 slot_id, ep_index); in handle_tx_event()
2588 ep_index); in handle_tx_event()
2602 slot_id, ep_index); in handle_tx_event()
2625 slot_id, ep_index); in handle_tx_event()
2632 slot_id, ep_index); in handle_tx_event()
2637 slot_id, ep_index); in handle_tx_event()
2642 slot_id, ep_index); in handle_tx_event()
2647 ep_index); in handle_tx_event()
2652 slot_id, ep_index); in handle_tx_event()
2657 slot_id, ep_index); in handle_tx_event()
2662 slot_id, ep_index); in handle_tx_event()
2669 slot_id, ep_index); in handle_tx_event()
2676 slot_id, ep_index); in handle_tx_event()
2682 slot_id, ep_index); in handle_tx_event()
2687 slot_id, ep_index); in handle_tx_event()
2700 ep_index); in handle_tx_event()
2708 ep_index); in handle_tx_event()
2720 slot_id, ep_index); in handle_tx_event()
2726 slot_id, ep_index); in handle_tx_event()
2733 slot_id, ep_index); in handle_tx_event()
2743 trb_comp_code, slot_id, ep_index); in handle_tx_event()
2765 ep_index); in handle_tx_event()
2770 slot_id, ep_index); in handle_tx_event()
2785 slot_id, ep_index); in handle_tx_event()
2827 "comp_code %u\n", ep_index, in handle_tx_event()
2846 slot_id, ep_index); in handle_tx_event()
3256 unsigned int ep_index, in prepare_transfer() argument
3267 struct xhci_ep_ctx *ep_ctx = xhci_get_ep_ctx(xhci, xdev->out_ctx, ep_index); in prepare_transfer()
3269 ep_ring = xhci_triad_to_transfer_ring(xhci, xdev->slot_id, ep_index, in prepare_transfer()
3362 unsigned int ep_index, unsigned int stream_id, int start_cycle, in giveback_first_trb() argument
3374 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, stream_id); in giveback_first_trb()
3414 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_intr_tx() argument
3418 ep_ctx = xhci_get_ep_ctx(xhci, xhci->devs[slot_id]->out_ctx, ep_index); in xhci_queue_intr_tx()
3421 return xhci_queue_bulk_tx(xhci, mem_flags, urb, slot_id, ep_index); in xhci_queue_intr_tx()
3542 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_bulk_tx() argument
3577 ep_index, urb->stream_id, in xhci_queue_bulk_tx()
3686 ep_index, urb->stream_id, in xhci_queue_bulk_tx()
3696 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, in xhci_queue_bulk_tx()
3703 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_ctrl_tx() argument
3736 ep_index, urb->stream_id, in xhci_queue_ctrl_tx()
3831 giveback_first_trb(xhci, slot_id, ep_index, 0, in xhci_queue_ctrl_tx()
4000 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_isoc_tx() argument
4017 xep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_isoc_tx()
4018 ep_ring = xhci->devs[slot_id]->eps[ep_index].ring; in xhci_queue_isoc_tx()
4053 ret = prepare_transfer(xhci, xhci->devs[slot_id], ep_index, in xhci_queue_isoc_tx()
4158 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, in xhci_queue_isoc_tx()
4192 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_isoc_tx_prepare() argument
4204 xep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_isoc_tx_prepare()
4205 ep_ring = xdev->eps[ep_index].ring; in xhci_queue_isoc_tx_prepare()
4206 ep_ctx = xhci_get_ep_ctx(xhci, xdev->out_ctx, ep_index); in xhci_queue_isoc_tx_prepare()
4262 return xhci_queue_isoc_tx(xhci, mem_flags, urb, slot_id, ep_index); in xhci_queue_isoc_tx_prepare()
4375 int slot_id, unsigned int ep_index, int suspend) in xhci_queue_stop_endpoint() argument
4378 u32 trb_ep_index = EP_ID_FOR_TRB(ep_index); in xhci_queue_stop_endpoint()
4387 int slot_id, unsigned int ep_index, in xhci_queue_reset_ep() argument
4391 u32 trb_ep_index = EP_ID_FOR_TRB(ep_index); in xhci_queue_reset_ep()