Lines Matching refs:slot_id

427 		unsigned int slot_id,  in xhci_ring_ep_doorbell()  argument
431 __le32 __iomem *db_addr = &xhci->dba->doorbell[slot_id]; in xhci_ring_ep_doorbell()
432 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_ring_ep_doorbell()
445 trace_xhci_ring_ep_doorbell(slot_id, DB_VALUE(ep_index, stream_id)); in xhci_ring_ep_doorbell()
454 unsigned int slot_id, in ring_doorbell_for_active_rings() argument
460 ep = &xhci->devs[slot_id]->eps[ep_index]; in ring_doorbell_for_active_rings()
465 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0); in ring_doorbell_for_active_rings()
473 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, in ring_doorbell_for_active_rings()
479 unsigned int slot_id, in xhci_ring_doorbell_for_active_rings() argument
482 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_ring_doorbell_for_active_rings()
486 unsigned int slot_id, in xhci_get_virt_ep() argument
489 if (slot_id == 0 || slot_id >= MAX_HC_SLOTS) { in xhci_get_virt_ep()
490 xhci_warn(xhci, "Invalid slot_id %u\n", slot_id); in xhci_get_virt_ep()
497 if (!xhci->devs[slot_id]) { in xhci_get_virt_ep()
498 xhci_warn(xhci, "No xhci virt device for slot_id %u\n", slot_id); in xhci_get_virt_ep()
502 return &xhci->devs[slot_id]->eps[ep_index]; in xhci_get_virt_ep()
518 stream_id, ep->vdev->slot_id, ep->ep_index); in xhci_virt_ep_to_ring()
530 unsigned int slot_id, unsigned int ep_index, in xhci_triad_to_transfer_ring() argument
535 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_triad_to_transfer_ring()
567 unsigned int slot_id, unsigned int ep_index, in xhci_move_dequeue_past_td() argument
570 struct xhci_virt_device *dev = xhci->devs[slot_id]; in xhci_move_dequeue_past_td()
587 ep_ring = xhci_triad_to_transfer_ring(xhci, slot_id, in xhci_move_dequeue_past_td()
697 STREAM_ID_FOR_TRB(stream_id), SLOT_ID_FOR_TRB(slot_id) | in xhci_move_dequeue_past_td()
874 static int xhci_reset_halted_ep(struct xhci_hcd *xhci, unsigned int slot_id, in xhci_reset_halted_ep() argument
888 ep_index, slot_id); in xhci_reset_halted_ep()
890 ret = xhci_queue_reset_ep(xhci, command, slot_id, ep_index, reset_type); in xhci_reset_halted_ep()
894 slot_id, ep_index, ret); in xhci_reset_halted_ep()
903 unsigned int slot_id = ep->vdev->slot_id; in xhci_handle_halted_endpoint() local
928 err = xhci_reset_halted_ep(xhci, slot_id, ep->ep_index, reset_type); in xhci_handle_halted_endpoint()
956 unsigned int slot_id = ep->vdev->slot_id; in xhci_invalidate_cancelled_tds() local
1012 err = xhci_move_dequeue_past_td(xhci, slot_id, ep->ep_index, in xhci_invalidate_cancelled_tds()
1059 static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_stop_ep() argument
1071 if (!xhci->devs[slot_id]) in xhci_handle_cmd_stop_ep()
1073 slot_id); in xhci_handle_cmd_stop_ep()
1078 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
1128 xhci_queue_stop_endpoint(xhci, command, slot_id, ep_index, 0); in xhci_handle_cmd_stop_ep()
1143 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_stop_ep()
1166 int slot_id, int ep_index) in xhci_kill_endpoint_urbs() argument
1173 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_kill_endpoint_urbs()
1189 slot_id, ep_index, stream_id); in xhci_kill_endpoint_urbs()
1198 slot_id, ep_index); in xhci_kill_endpoint_urbs()
1299 static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_set_deq() argument
1312 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_set_deq()
1348 slot_id); in xhci_handle_cmd_set_deq()
1405 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_set_deq()
1408 static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_reset_ep() argument
1416 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in xhci_handle_cmd_reset_ep()
1439 ring_doorbell_for_active_rings(xhci, slot_id, ep_index); in xhci_handle_cmd_reset_ep()
1442 static void xhci_handle_cmd_enable_slot(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_enable_slot() argument
1446 command->slot_id = slot_id; in xhci_handle_cmd_enable_slot()
1448 command->slot_id = 0; in xhci_handle_cmd_enable_slot()
1451 static void xhci_handle_cmd_disable_slot(struct xhci_hcd *xhci, int slot_id) in xhci_handle_cmd_disable_slot() argument
1456 virt_dev = xhci->devs[slot_id]; in xhci_handle_cmd_disable_slot()
1468 static void xhci_handle_cmd_config_ep(struct xhci_hcd *xhci, int slot_id, in xhci_handle_cmd_config_ep() argument
1482 virt_dev = xhci->devs[slot_id]; in xhci_handle_cmd_config_ep()
1502 static void xhci_handle_cmd_addr_dev(struct xhci_hcd *xhci, int slot_id) in xhci_handle_cmd_addr_dev() argument
1507 vdev = xhci->devs[slot_id]; in xhci_handle_cmd_addr_dev()
1514 static void xhci_handle_cmd_reset_dev(struct xhci_hcd *xhci, int slot_id) in xhci_handle_cmd_reset_dev() argument
1519 vdev = xhci->devs[slot_id]; in xhci_handle_cmd_reset_dev()
1522 slot_id); in xhci_handle_cmd_reset_dev()
1645 unsigned int slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in handle_cmd_completion() local
1653 if (slot_id >= MAX_HC_SLOTS) { in handle_cmd_completion()
1654 xhci_warn(xhci, "Invalid slot_id %u\n", slot_id); in handle_cmd_completion()
1711 xhci_handle_cmd_enable_slot(xhci, slot_id, cmd, cmd_comp_code); in handle_cmd_completion()
1714 xhci_handle_cmd_disable_slot(xhci, slot_id); in handle_cmd_completion()
1718 xhci_handle_cmd_config_ep(xhci, slot_id, cmd_comp_code); in handle_cmd_completion()
1723 xhci_handle_cmd_addr_dev(xhci, slot_id); in handle_cmd_completion()
1726 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1729 xhci_handle_cmd_stop_ep(xhci, slot_id, cmd_trb, in handle_cmd_completion()
1733 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1735 xhci_handle_cmd_set_deq(xhci, slot_id, cmd_trb, cmd_comp_code); in handle_cmd_completion()
1743 WARN_ON(slot_id != TRB_TO_SLOT_ID( in handle_cmd_completion()
1745 xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code); in handle_cmd_completion()
1751 slot_id = TRB_TO_SLOT_ID( in handle_cmd_completion()
1753 xhci_handle_cmd_reset_dev(xhci, slot_id); in handle_cmd_completion()
1790 u32 slot_id; in handle_device_notification() local
1793 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->generic.field[3])); in handle_device_notification()
1794 if (!xhci->devs[slot_id]) { in handle_device_notification()
1796 "unused slot %u\n", slot_id); in handle_device_notification()
1801 slot_id); in handle_device_notification()
1802 udev = xhci->devs[slot_id]->udev; in handle_device_notification()
1843 int slot_id; in handle_port_status() local
1896 slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1); in handle_port_status()
1897 if (slot_id && xhci->devs[slot_id]) in handle_port_status()
1898 xhci->devs[slot_id]->flags |= VDEV_PORT_ERROR; in handle_port_status()
1956 slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1); in handle_port_status()
1957 if (slot_id && xhci->devs[slot_id]) in handle_port_status()
1958 xhci_ring_device(xhci, slot_id); in handle_port_status()
2530 unsigned int slot_id; in handle_tx_event() local
2543 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags)); in handle_tx_event()
2548 ep = xhci_get_virt_ep(xhci, slot_id, ep_index); in handle_tx_event()
2560 slot_id, ep_index); in handle_tx_event()
2586 slot_id, ep_index); in handle_tx_event()
2611 slot_id, ep_index); in handle_tx_event()
2618 slot_id, ep_index); in handle_tx_event()
2623 slot_id, ep_index); in handle_tx_event()
2628 slot_id, ep_index); in handle_tx_event()
2632 xhci_dbg(xhci, "Stalled endpoint for slot %u ep %u\n", slot_id, in handle_tx_event()
2638 slot_id, ep_index); in handle_tx_event()
2643 slot_id, ep_index); in handle_tx_event()
2648 slot_id, ep_index); in handle_tx_event()
2655 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()
2706 slot_id, ep_index); in handle_tx_event()
2712 slot_id, ep_index); in handle_tx_event()
2719 slot_id, ep_index); in handle_tx_event()
2729 trb_comp_code, slot_id, ep_index); in handle_tx_event()
2756 slot_id, ep_index); in handle_tx_event()
2773 slot_id, ep_index); in handle_tx_event()
2834 slot_id, ep_index); in handle_tx_event()
3249 ep_ring = xhci_triad_to_transfer_ring(xhci, xdev->slot_id, ep_index, in prepare_transfer()
3341 static void giveback_first_trb(struct xhci_hcd *xhci, int slot_id, in giveback_first_trb() argument
3354 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, stream_id); in giveback_first_trb()
3394 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_intr_tx() argument
3398 ep_ctx = xhci_get_ep_ctx(xhci, xhci->devs[slot_id]->out_ctx, ep_index); in xhci_queue_intr_tx()
3401 return xhci_queue_bulk_tx(xhci, mem_flags, urb, slot_id, ep_index); in xhci_queue_intr_tx()
3522 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_bulk_tx() argument
3556 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_bulk_tx()
3665 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_bulk_tx()
3676 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, in xhci_queue_bulk_tx()
3683 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_ctrl_tx() argument
3715 ret = prepare_transfer(xhci, xhci->devs[slot_id], in xhci_queue_ctrl_tx()
3811 giveback_first_trb(xhci, slot_id, ep_index, 0, in xhci_queue_ctrl_tx()
3980 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_isoc_tx() argument
3997 xep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_isoc_tx()
3998 ep_ring = xhci->devs[slot_id]->eps[ep_index].ring; in xhci_queue_isoc_tx()
4033 ret = prepare_transfer(xhci, xhci->devs[slot_id], ep_index, in xhci_queue_isoc_tx()
4138 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, in xhci_queue_isoc_tx()
4173 struct urb *urb, int slot_id, unsigned int ep_index) in xhci_queue_isoc_tx_prepare() argument
4184 xdev = xhci->devs[slot_id]; in xhci_queue_isoc_tx_prepare()
4185 xep = &xhci->devs[slot_id]->eps[ep_index]; in xhci_queue_isoc_tx_prepare()
4244 return xhci_queue_isoc_tx(xhci, mem_flags, urb, slot_id, ep_index); in xhci_queue_isoc_tx_prepare()
4300 u32 trb_type, u32 slot_id) in xhci_queue_slot_control() argument
4303 TRB_TYPE(trb_type) | SLOT_ID_FOR_TRB(slot_id), false); in xhci_queue_slot_control()
4308 dma_addr_t in_ctx_ptr, u32 slot_id, enum xhci_setup_dev setup) in xhci_queue_address_device() argument
4312 TRB_TYPE(TRB_ADDR_DEV) | SLOT_ID_FOR_TRB(slot_id) in xhci_queue_address_device()
4324 u32 slot_id) in xhci_queue_reset_device() argument
4327 TRB_TYPE(TRB_RESET_DEV) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_reset_device()
4334 u32 slot_id, bool command_must_succeed) in xhci_queue_configure_endpoint() argument
4338 TRB_TYPE(TRB_CONFIG_EP) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_configure_endpoint()
4344 dma_addr_t in_ctx_ptr, u32 slot_id, bool command_must_succeed) in xhci_queue_evaluate_context() argument
4348 TRB_TYPE(TRB_EVAL_CONTEXT) | SLOT_ID_FOR_TRB(slot_id), in xhci_queue_evaluate_context()
4357 int slot_id, unsigned int ep_index, int suspend) in xhci_queue_stop_endpoint() argument
4359 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id); in xhci_queue_stop_endpoint()
4369 int slot_id, unsigned int ep_index, in xhci_queue_reset_ep() argument
4372 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id); in xhci_queue_reset_ep()