Lines Matching refs:slot_id
403 unsigned int slot_id, in xhci_ring_ep_doorbell() argument
407 __le32 __iomem *db_addr = &xhci->dba->doorbell[slot_id]; in xhci_ring_ep_doorbell()
408 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_ring_ep_doorbell()
421 trace_xhci_ring_ep_doorbell(slot_id, DB_VALUE(ep_index, stream_id)); in xhci_ring_ep_doorbell()
431 unsigned int slot_id, in ring_doorbell_for_active_rings() argument
437 ep = &xhci->devs[slot_id]->eps[ep_index]; in ring_doorbell_for_active_rings()
442 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0); in ring_doorbell_for_active_rings()
450 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, in ring_doorbell_for_active_rings()
456 unsigned int slot_id, in xhci_ring_doorbell_for_active_rings() argument
459 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_ring_doorbell_for_active_rings()
463 unsigned int slot_id, in xhci_get_virt_ep() argument
466 if (slot_id == 0 || slot_id >= MAX_HC_SLOTS) { in xhci_get_virt_ep()
467 xhci_warn(xhci, "Invalid slot_id %u\n", slot_id); in xhci_get_virt_ep()
474 if (!xhci->devs[slot_id]) { in xhci_get_virt_ep()
475 xhci_warn(xhci, "No xhci virt device for slot_id %u\n", slot_id); in xhci_get_virt_ep()
479 return &xhci->devs[slot_id]->eps[ep_index]; in xhci_get_virt_ep()
487 unsigned int slot_id, unsigned int ep_index, in xhci_triad_to_transfer_ring() argument
492 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_triad_to_transfer_ring()
504 slot_id, ep_index); in xhci_triad_to_transfer_ring()
515 slot_id, ep_index, in xhci_triad_to_transfer_ring()
564 unsigned int slot_id, unsigned int ep_index, in xhci_find_new_dequeue_state() argument
568 struct xhci_virt_device *dev = xhci->devs[slot_id]; in xhci_find_new_dequeue_state()
581 ep_ring = xhci_triad_to_transfer_ring(xhci, slot_id, in xhci_find_new_dequeue_state()
786 static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_stop_ep() argument
800 if (!xhci->devs[slot_id]) in xhci_handle_cmd_stop_ep()
803 slot_id); in xhci_handle_cmd_stop_ep()
810 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
814 vdev = xhci->devs[slot_id]; in xhci_handle_cmd_stop_ep()
823 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
866 xhci_find_new_dequeue_state(xhci, slot_id, ep_index, in xhci_handle_cmd_stop_ep()
886 xhci_queue_new_dequeue_state(xhci, slot_id, ep_index, in xhci_handle_cmd_stop_ep()
891 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
945 int slot_id, int ep_index) in xhci_kill_endpoint_urbs() argument
952 ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_kill_endpoint_urbs()
965 slot_id, ep_index, stream_id); in xhci_kill_endpoint_urbs()
974 slot_id, ep_index); in xhci_kill_endpoint_urbs()
1130 static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_set_deq() argument
1143 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_set_deq()
1147 dev = xhci->devs[slot_id]; in xhci_handle_cmd_set_deq()
1180 slot_id); in xhci_handle_cmd_set_deq()
1224 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_set_deq()
1227 static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_reset_ep() argument
1236 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_reset_ep()
1240 vdev = xhci->devs[slot_id]; in xhci_handle_cmd_reset_ep()
1264 xhci->devs[slot_id]->in_ctx->dma, slot_id, in xhci_handle_cmd_reset_ep()
1274 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_reset_ep()
1277 static void xhci_handle_cmd_enable_slot(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_enable_slot() argument
1281 command->slot_id = slot_id; in xhci_handle_cmd_enable_slot()
1283 command->slot_id = 0; in xhci_handle_cmd_enable_slot()
1286 static void xhci_handle_cmd_disable_slot(struct xhci_hcd *xhci, int slot_id) in xhci_handle_cmd_disable_slot() argument
1291 virt_dev = xhci->devs[slot_id]; in xhci_handle_cmd_disable_slot()
1303 static void xhci_handle_cmd_config_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_config_ep() argument
1321 virt_dev = xhci->devs[slot_id]; in xhci_handle_cmd_config_ep()
1354 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_config_ep()
1360 static void xhci_handle_cmd_addr_dev(struct xhci_hcd *xhci, int slot_id) in xhci_handle_cmd_addr_dev() argument
1365 vdev = xhci->devs[slot_id]; in xhci_handle_cmd_addr_dev()
1370 static void xhci_handle_cmd_reset_dev(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_reset_dev() argument
1376 vdev = xhci->devs[slot_id]; in xhci_handle_cmd_reset_dev()
1381 if (!xhci->devs[slot_id]) in xhci_handle_cmd_reset_dev()
1383 "for disabled slot %u\n", slot_id); in xhci_handle_cmd_reset_dev()
1476 int slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in handle_cmd_completion() local
1537 xhci_handle_cmd_enable_slot(xhci, slot_id, cmd, cmd_comp_code); in handle_cmd_completion()
1540 xhci_handle_cmd_disable_slot(xhci, slot_id); in handle_cmd_completion()
1544 xhci_handle_cmd_config_ep(xhci, slot_id, event, in handle_cmd_completion()
1550 xhci_handle_cmd_addr_dev(xhci, slot_id); in handle_cmd_completion()
1553 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1556 xhci_handle_cmd_stop_ep(xhci, slot_id, cmd_trb, event); in handle_cmd_completion()
1559 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1561 xhci_handle_cmd_set_deq(xhci, slot_id, cmd_trb, cmd_comp_code); in handle_cmd_completion()
1569 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1571 xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code); in handle_cmd_completion()
1577 slot_id = TRB_TO_SLOT_ID( in handle_cmd_completion()
1579 xhci_handle_cmd_reset_dev(xhci, slot_id, event); in handle_cmd_completion()
1619 u32 slot_id; in handle_device_notification() local
1622 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->generic.field[3])); in handle_device_notification()
1623 if (!xhci->devs[slot_id]) { in handle_device_notification()
1625 "unused slot %u\n", slot_id); in handle_device_notification()
1630 slot_id); in handle_device_notification()
1631 udev = xhci->devs[slot_id]->udev; in handle_device_notification()
1672 int slot_id; in handle_port_status() local
1725 slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1); in handle_port_status()
1726 if (slot_id && xhci->devs[slot_id]) in handle_port_status()
1727 xhci->devs[slot_id]->flags |= VDEV_PORT_ERROR; in handle_port_status()
1785 slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1); in handle_port_status()
1786 if (slot_id && xhci->devs[slot_id]) in handle_port_status()
1787 xhci_ring_device(xhci, slot_id); in handle_port_status()
1928 unsigned int slot_id, unsigned int ep_index, in xhci_cleanup_halted_endpoint() argument
1932 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_cleanup_halted_endpoint()
1939 if (xhci->devs[slot_id]->flags & VDEV_PORT_ERROR) in xhci_cleanup_halted_endpoint()
1948 xhci_queue_reset_ep(xhci, command, slot_id, ep_index, reset_type); in xhci_cleanup_halted_endpoint()
1952 xhci_cleanup_stalled_ring(xhci, slot_id, ep_index, stream_id, in xhci_cleanup_halted_endpoint()
2051 unsigned int slot_id; in finish_td() local
2055 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in finish_td()
2056 xdev = xhci->devs[slot_id]; in finish_td()
2086 xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index, in finish_td()
2121 unsigned int slot_id; in process_ctrl_td() local
2129 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in process_ctrl_td()
2130 xdev = xhci->devs[slot_id]; in process_ctrl_td()
2341 unsigned int slot_id; in process_bulk_intr_td() local
2344 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in process_bulk_intr_td()
2345 slot_ctx = xhci_get_slot_ctx(xhci, xhci->devs[slot_id]->out_ctx); in process_bulk_intr_td()
2385 xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index, in process_bulk_intr_td()
2419 unsigned int slot_id; in handle_tx_event() local
2432 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in handle_tx_event()
2437 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in handle_tx_event()
2443 xdev = xhci->devs[slot_id]; in handle_tx_event()
2450 slot_id, ep_index); in handle_tx_event()
2461 xhci_cleanup_halted_endpoint(xhci, slot_id, ep_index, 0, in handle_tx_event()
2470 slot_id, ep_index); in handle_tx_event()
2495 slot_id, ep_index); in handle_tx_event()
2501 slot_id, ep_index); in handle_tx_event()
2506 slot_id, ep_index); in handle_tx_event()
2511 slot_id, ep_index); in handle_tx_event()
2515 xhci_dbg(xhci, "Stalled endpoint for slot %u ep %u\n", slot_id, in handle_tx_event()
2522 slot_id, ep_index); in handle_tx_event()
2527 slot_id, ep_index); in handle_tx_event()
2532 slot_id, ep_index); in handle_tx_event()
2539 slot_id, ep_index); in handle_tx_event()
2546 slot_id, ep_index); in handle_tx_event()
2552 slot_id, ep_index); in handle_tx_event()
2557 slot_id, ep_index); in handle_tx_event()
2590 slot_id, ep_index); in handle_tx_event()
2596 slot_id, ep_index); in handle_tx_event()
2603 slot_id, ep_index); in handle_tx_event()
2613 trb_comp_code, slot_id, ep_index); in handle_tx_event()
2640 slot_id, ep_index); in handle_tx_event()
2645 xhci_cleanup_halted_endpoint(xhci, slot_id, in handle_tx_event()
2658 slot_id, ep_index); in handle_tx_event()
2719 slot_id, ep_index); in handle_tx_event()
2740 xhci_cleanup_halted_endpoint(xhci, slot_id, in handle_tx_event()
3205 static void giveback_first_trb(struct xhci_hcd *xhci, int slot_id, in giveback_first_trb() argument
3218 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, stream_id); in giveback_first_trb()
3258 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_intr_tx() argument
3262 ep_ctx = xhci_get_ep_ctx(xhci, xhci->devs[slot_id]->out_ctx, ep_index); in xhci_queue_intr_tx()
3265 return xhci_queue_bulk_tx(xhci, mem_flags, urb, slot_id, ep_index); in xhci_queue_intr_tx()
3386 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_bulk_tx() argument
3420 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_bulk_tx()
3529 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_bulk_tx()
3538 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, in xhci_queue_bulk_tx()
3545 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_ctrl_tx() argument
3577 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_ctrl_tx()
3671 giveback_first_trb(xhci, slot_id, ep_index, 0, in xhci_queue_ctrl_tx()
3840 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_isoc_tx() argument
3857 xep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_isoc_tx()
3858 ep_ring = xhci->devs[slot_id]->eps[ep_index].ring; in xhci_queue_isoc_tx()
3893 ret = prepare_transfer(xhci, xhci->devs[slot_id], ep_index, in xhci_queue_isoc_tx()
3997 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, in xhci_queue_isoc_tx()
4032 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_isoc_tx_prepare() argument
4043 xdev = xhci->devs[slot_id]; in xhci_queue_isoc_tx_prepare()
4044 xep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_isoc_tx_prepare()
4103 return xhci_queue_isoc_tx(xhci, mem_flags, urb, slot_id, ep_index); in xhci_queue_isoc_tx_prepare()
4159 u32 trb_type, u32 slot_id) in xhci_queue_slot_control() argument
4162 TRB_TYPE(trb_type) | SLOT_ID_FOR_TRB(slot_id), false); in xhci_queue_slot_control()
4167 dma_addr_t in_ctx_ptr, u32 slot_id, enum xhci_setup_dev setup) in xhci_queue_address_device() argument
4171 TRB_TYPE(TRB_ADDR_DEV) | SLOT_ID_FOR_TRB(slot_id) in xhci_queue_address_device()
4183 u32 slot_id) in xhci_queue_reset_device() argument
4186 TRB_TYPE(TRB_RESET_DEV) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_reset_device()
4193 u32 slot_id, bool command_must_succeed) in xhci_queue_configure_endpoint() argument
4197 TRB_TYPE(TRB_CONFIG_EP) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_configure_endpoint()
4203 dma_addr_t in_ctx_ptr, u32 slot_id, bool command_must_succeed) in xhci_queue_evaluate_context() argument
4207 TRB_TYPE(TRB_EVAL_CONTEXT) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_evaluate_context()
4216 int slot_id, unsigned int ep_index, int suspend) in xhci_queue_stop_endpoint() argument
4218 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id); in xhci_queue_stop_endpoint()
4229 unsigned int slot_id, unsigned int ep_index, in xhci_queue_new_dequeue_state() argument
4233 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id); in xhci_queue_new_dequeue_state()
4259 ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_new_dequeue_state()
4293 int slot_id, unsigned int ep_index, in xhci_queue_reset_ep() argument
4296 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id); in xhci_queue_reset_ep()