Lines Matching refs:slot_id

429 		unsigned int slot_id,  in xhci_ring_ep_doorbell()  argument
433 __le32 __iomem *db_addr = &xhci->dba->doorbell[slot_id]; in xhci_ring_ep_doorbell()
434 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_ring_ep_doorbell()
447 trace_xhci_ring_ep_doorbell(slot_id, DB_VALUE(ep_index, stream_id)); in xhci_ring_ep_doorbell()
456 unsigned int slot_id, in ring_doorbell_for_active_rings() argument
462 ep = &xhci->devs[slot_id]->eps[ep_index]; in ring_doorbell_for_active_rings()
467 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0); in ring_doorbell_for_active_rings()
475 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, in ring_doorbell_for_active_rings()
481 unsigned int slot_id, in xhci_ring_doorbell_for_active_rings() argument
484 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_ring_doorbell_for_active_rings()
488 unsigned int slot_id, in xhci_get_virt_ep() argument
491 if (slot_id == 0 || slot_id >= MAX_HC_SLOTS) { in xhci_get_virt_ep()
492 xhci_warn(xhci, "Invalid slot_id %u\n", slot_id); in xhci_get_virt_ep()
499 if (!xhci->devs[slot_id]) { in xhci_get_virt_ep()
500 xhci_warn(xhci, "No xhci virt device for slot_id %u\n", slot_id); in xhci_get_virt_ep()
504 return &xhci->devs[slot_id]->eps[ep_index]; in xhci_get_virt_ep()
520 stream_id, ep->vdev->slot_id, ep->ep_index); in xhci_virt_ep_to_ring()
532 unsigned int slot_id, unsigned int ep_index, in xhci_triad_to_transfer_ring() argument
537 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_triad_to_transfer_ring()
569 unsigned int slot_id, unsigned int ep_index, in xhci_move_dequeue_past_td() argument
572 struct xhci_virt_device *dev = xhci->devs[slot_id]; in xhci_move_dequeue_past_td()
589 ep_ring = xhci_triad_to_transfer_ring(xhci, slot_id, in xhci_move_dequeue_past_td()
699 STREAM_ID_FOR_TRB(stream_id), SLOT_ID_FOR_TRB(slot_id) | in xhci_move_dequeue_past_td()
884 static int xhci_reset_halted_ep(struct xhci_hcd *xhci, unsigned int slot_id, in xhci_reset_halted_ep() argument
898 ep_index, slot_id); in xhci_reset_halted_ep()
900 ret = xhci_queue_reset_ep(xhci, command, slot_id, ep_index, reset_type); in xhci_reset_halted_ep()
904 slot_id, ep_index, ret); in xhci_reset_halted_ep()
913 unsigned int slot_id = ep->vdev->slot_id; in xhci_handle_halted_endpoint() local
938 err = xhci_reset_halted_ep(xhci, slot_id, ep->ep_index, reset_type); in xhci_handle_halted_endpoint()
966 unsigned int slot_id = ep->vdev->slot_id; in xhci_invalidate_cancelled_tds() local
1024 err = xhci_move_dequeue_past_td(xhci, slot_id, ep->ep_index, in xhci_invalidate_cancelled_tds()
1071 static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_stop_ep() argument
1083 if (!xhci->devs[slot_id]) in xhci_handle_cmd_stop_ep()
1085 slot_id); in xhci_handle_cmd_stop_ep()
1090 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
1141 xhci_queue_stop_endpoint(xhci, command, slot_id, ep_index, 0); in xhci_handle_cmd_stop_ep()
1155 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
1178 int slot_id, int ep_index) in xhci_kill_endpoint_urbs() argument
1185 ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_kill_endpoint_urbs()
1198 slot_id, ep_index, stream_id); in xhci_kill_endpoint_urbs()
1207 slot_id, ep_index); in xhci_kill_endpoint_urbs()
1353 static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_set_deq() argument
1366 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_set_deq()
1402 slot_id); in xhci_handle_cmd_set_deq()
1459 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_set_deq()
1462 static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_reset_ep() argument
1470 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_reset_ep()
1495 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_reset_ep()
1498 static void xhci_handle_cmd_enable_slot(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_enable_slot() argument
1502 command->slot_id = slot_id; in xhci_handle_cmd_enable_slot()
1504 command->slot_id = 0; in xhci_handle_cmd_enable_slot()
1507 static void xhci_handle_cmd_disable_slot(struct xhci_hcd *xhci, int slot_id) in xhci_handle_cmd_disable_slot() argument
1512 virt_dev = xhci->devs[slot_id]; in xhci_handle_cmd_disable_slot()
1524 static void xhci_handle_cmd_config_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_config_ep() argument
1542 virt_dev = xhci->devs[slot_id]; in xhci_handle_cmd_config_ep()
1577 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_config_ep()
1583 static void xhci_handle_cmd_addr_dev(struct xhci_hcd *xhci, int slot_id) in xhci_handle_cmd_addr_dev() argument
1588 vdev = xhci->devs[slot_id]; in xhci_handle_cmd_addr_dev()
1595 static void xhci_handle_cmd_reset_dev(struct xhci_hcd *xhci, int slot_id) in xhci_handle_cmd_reset_dev() argument
1600 vdev = xhci->devs[slot_id]; in xhci_handle_cmd_reset_dev()
1603 slot_id); in xhci_handle_cmd_reset_dev()
1702 unsigned int slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in handle_cmd_completion() local
1710 if (slot_id >= MAX_HC_SLOTS) { in handle_cmd_completion()
1711 xhci_warn(xhci, "Invalid slot_id %u\n", slot_id); in handle_cmd_completion()
1768 xhci_handle_cmd_enable_slot(xhci, slot_id, cmd, cmd_comp_code); in handle_cmd_completion()
1771 xhci_handle_cmd_disable_slot(xhci, slot_id); in handle_cmd_completion()
1775 xhci_handle_cmd_config_ep(xhci, slot_id, cmd_comp_code); in handle_cmd_completion()
1780 xhci_handle_cmd_addr_dev(xhci, slot_id); in handle_cmd_completion()
1783 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1786 xhci_handle_cmd_stop_ep(xhci, slot_id, cmd_trb, in handle_cmd_completion()
1790 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1792 xhci_handle_cmd_set_deq(xhci, slot_id, cmd_trb, cmd_comp_code); in handle_cmd_completion()
1800 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1802 xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code); in handle_cmd_completion()
1808 slot_id = TRB_TO_SLOT_ID( in handle_cmd_completion()
1810 xhci_handle_cmd_reset_dev(xhci, slot_id); in handle_cmd_completion()
1847 u32 slot_id; in handle_device_notification() local
1850 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->generic.field[3])); in handle_device_notification()
1851 if (!xhci->devs[slot_id]) { in handle_device_notification()
1853 "unused slot %u\n", slot_id); in handle_device_notification()
1858 slot_id); in handle_device_notification()
1859 udev = xhci->devs[slot_id]->udev; in handle_device_notification()
1900 int slot_id; in handle_port_status() local
1953 slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1); in handle_port_status()
1954 if (slot_id && xhci->devs[slot_id]) in handle_port_status()
1955 xhci->devs[slot_id]->flags |= VDEV_PORT_ERROR; in handle_port_status()
2013 slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1); in handle_port_status()
2014 if (slot_id && xhci->devs[slot_id]) in handle_port_status()
2015 xhci_ring_device(xhci, slot_id); in handle_port_status()
2587 unsigned int slot_id; in handle_tx_event() local
2600 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in handle_tx_event()
2605 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in handle_tx_event()
2617 slot_id, ep_index); in handle_tx_event()
2637 slot_id, ep_index); in handle_tx_event()
2662 slot_id, ep_index); in handle_tx_event()
2668 slot_id, ep_index); in handle_tx_event()
2673 slot_id, ep_index); in handle_tx_event()
2678 slot_id, ep_index); in handle_tx_event()
2682 xhci_dbg(xhci, "Stalled endpoint for slot %u ep %u\n", slot_id, in handle_tx_event()
2688 slot_id, ep_index); in handle_tx_event()
2693 slot_id, ep_index); in handle_tx_event()
2698 slot_id, ep_index); in handle_tx_event()
2705 slot_id, ep_index); in handle_tx_event()
2712 slot_id, ep_index); in handle_tx_event()
2718 slot_id, ep_index); in handle_tx_event()
2723 slot_id, ep_index); in handle_tx_event()
2756 slot_id, ep_index); in handle_tx_event()
2762 slot_id, ep_index); in handle_tx_event()
2769 slot_id, ep_index); in handle_tx_event()
2779 trb_comp_code, slot_id, ep_index); in handle_tx_event()
2806 slot_id, ep_index); in handle_tx_event()
2823 slot_id, ep_index); in handle_tx_event()
2884 slot_id, ep_index); in handle_tx_event()
3310 ep_ring = xhci_triad_to_transfer_ring(xhci, xdev->slot_id, ep_index, in prepare_transfer()
3402 static void giveback_first_trb(struct xhci_hcd *xhci, int slot_id, in giveback_first_trb() argument
3415 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, stream_id); in giveback_first_trb()
3455 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_intr_tx() argument
3459 ep_ctx = xhci_get_ep_ctx(xhci, xhci->devs[slot_id]->out_ctx, ep_index); in xhci_queue_intr_tx()
3462 return xhci_queue_bulk_tx(xhci, mem_flags, urb, slot_id, ep_index); in xhci_queue_intr_tx()
3583 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_bulk_tx() argument
3617 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_bulk_tx()
3726 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_bulk_tx()
3737 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, in xhci_queue_bulk_tx()
3744 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_ctrl_tx() argument
3776 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_ctrl_tx()
3872 giveback_first_trb(xhci, slot_id, ep_index, 0, in xhci_queue_ctrl_tx()
4041 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_isoc_tx() argument
4058 xep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_isoc_tx()
4059 ep_ring = xhci->devs[slot_id]->eps[ep_index].ring; in xhci_queue_isoc_tx()
4094 ret = prepare_transfer(xhci, xhci->devs[slot_id], ep_index, in xhci_queue_isoc_tx()
4199 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, in xhci_queue_isoc_tx()
4234 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_isoc_tx_prepare() argument
4245 xdev = xhci->devs[slot_id]; in xhci_queue_isoc_tx_prepare()
4246 xep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_isoc_tx_prepare()
4305 return xhci_queue_isoc_tx(xhci, mem_flags, urb, slot_id, ep_index); in xhci_queue_isoc_tx_prepare()
4361 u32 trb_type, u32 slot_id) in xhci_queue_slot_control() argument
4364 TRB_TYPE(trb_type) | SLOT_ID_FOR_TRB(slot_id), false); in xhci_queue_slot_control()
4369 dma_addr_t in_ctx_ptr, u32 slot_id, enum xhci_setup_dev setup) in xhci_queue_address_device() argument
4373 TRB_TYPE(TRB_ADDR_DEV) | SLOT_ID_FOR_TRB(slot_id) in xhci_queue_address_device()
4385 u32 slot_id) in xhci_queue_reset_device() argument
4388 TRB_TYPE(TRB_RESET_DEV) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_reset_device()
4395 u32 slot_id, bool command_must_succeed) in xhci_queue_configure_endpoint() argument
4399 TRB_TYPE(TRB_CONFIG_EP) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_configure_endpoint()
4405 dma_addr_t in_ctx_ptr, u32 slot_id, bool command_must_succeed) in xhci_queue_evaluate_context() argument
4409 TRB_TYPE(TRB_EVAL_CONTEXT) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_evaluate_context()
4418 int slot_id, unsigned int ep_index, int suspend) in xhci_queue_stop_endpoint() argument
4420 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id); in xhci_queue_stop_endpoint()
4431 int slot_id, unsigned int ep_index, in xhci_queue_reset_ep() argument
4434 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id); in xhci_queue_reset_ep()