Lines Matching defs:slot_id
403 unsigned int slot_id,
407 __le32 __iomem *db_addr = &xhci->dba->doorbell[slot_id];
408 struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index];
421 trace_xhci_ring_ep_doorbell(slot_id, DB_VALUE(ep_index, stream_id));
431 unsigned int slot_id,
437 ep = &xhci->devs[slot_id]->eps[ep_index];
442 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, 0);
450 xhci_ring_ep_doorbell(xhci, slot_id, ep_index,
456 unsigned int slot_id,
459 ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
463 unsigned int slot_id,
466 if (slot_id == 0 || slot_id >= MAX_HC_SLOTS) {
467 xhci_warn(xhci, "Invalid slot_id %u\n", slot_id);
474 if (!xhci->devs[slot_id]) {
475 xhci_warn(xhci, "No xhci virt device for slot_id %u\n", slot_id);
479 return &xhci->devs[slot_id]->eps[ep_index];
482 /* Get the right ring for the given slot_id, ep_index and stream_id.
487 unsigned int slot_id, unsigned int ep_index,
492 ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
504 slot_id, ep_index);
515 slot_id, ep_index,
564 unsigned int slot_id, unsigned int ep_index,
568 struct xhci_virt_device *dev = xhci->devs[slot_id];
581 ep_ring = xhci_triad_to_transfer_ring(xhci, slot_id,
822 static int xhci_reset_halted_ep(struct xhci_hcd *xhci, unsigned int slot_id,
834 ret = xhci_queue_reset_ep(xhci, command, slot_id, ep_index, reset_type);
838 slot_id, ep_index, ret);
847 unsigned int slot_id = ep->vdev->slot_id;
859 err = xhci_reset_halted_ep(xhci, slot_id, ep->ep_index, reset_type);
865 xhci_cleanup_stalled_ring(xhci, slot_id, ep->ep_index, stream_id,
911 xhci_find_new_dequeue_state(xhci, ep->vdev->slot_id,
933 static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,
946 if (!xhci->devs[slot_id])
949 slot_id);
956 ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
960 vdev = xhci->devs[slot_id];
969 ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
979 xhci_queue_new_dequeue_state(xhci, slot_id, ep_index,
984 ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
1038 int slot_id, int ep_index)
1045 ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
1061 slot_id, ep_index, stream_id);
1070 slot_id, ep_index);
1226 static void xhci_handle_cmd_set_deq(struct xhci_hcd *xhci, int slot_id,
1239 ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
1243 dev = xhci->devs[slot_id];
1276 slot_id);
1320 ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
1323 static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id,
1332 ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
1336 vdev = xhci->devs[slot_id];
1360 xhci->devs[slot_id]->in_ctx->dma, slot_id,
1370 ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
1373 static void xhci_handle_cmd_enable_slot(struct xhci_hcd *xhci, int slot_id,
1377 command->slot_id = slot_id;
1379 command->slot_id = 0;
1382 static void xhci_handle_cmd_disable_slot(struct xhci_hcd *xhci, int slot_id)
1387 virt_dev = xhci->devs[slot_id];
1399 static void xhci_handle_cmd_config_ep(struct xhci_hcd *xhci, int slot_id,
1417 virt_dev = xhci->devs[slot_id];
1450 ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
1456 static void xhci_handle_cmd_addr_dev(struct xhci_hcd *xhci, int slot_id)
1461 vdev = xhci->devs[slot_id];
1466 static void xhci_handle_cmd_reset_dev(struct xhci_hcd *xhci, int slot_id,
1472 vdev = xhci->devs[slot_id];
1477 if (!xhci->devs[slot_id])
1479 "for disabled slot %u\n", slot_id);
1572 int slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags));
1633 xhci_handle_cmd_enable_slot(xhci, slot_id, cmd, cmd_comp_code);
1636 xhci_handle_cmd_disable_slot(xhci, slot_id);
1640 xhci_handle_cmd_config_ep(xhci, slot_id, event,
1646 xhci_handle_cmd_addr_dev(xhci, slot_id);
1649 WARN_ON(slot_id != TRB_TO_SLOT_ID(
1652 xhci_handle_cmd_stop_ep(xhci, slot_id, cmd_trb, event);
1655 WARN_ON(slot_id != TRB_TO_SLOT_ID(
1657 xhci_handle_cmd_set_deq(xhci, slot_id, cmd_trb, cmd_comp_code);
1665 WARN_ON(slot_id != TRB_TO_SLOT_ID(
1667 xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code);
1673 slot_id = TRB_TO_SLOT_ID(
1675 xhci_handle_cmd_reset_dev(xhci, slot_id, event);
1715 u32 slot_id;
1718 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->generic.field[3]));
1719 if (!xhci->devs[slot_id]) {
1721 "unused slot %u\n", slot_id);
1726 slot_id);
1727 udev = xhci->devs[slot_id]->udev;
1768 int slot_id;
1821 slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1);
1822 if (slot_id && xhci->devs[slot_id])
1823 xhci->devs[slot_id]->flags |= VDEV_PORT_ERROR;
1881 slot_id = xhci_find_slot_id_by_port(hcd, xhci, hcd_portnum + 1);
1882 if (slot_id && xhci->devs[slot_id])
1883 xhci_ring_device(xhci, slot_id);
2435 unsigned int slot_id;
2448 slot_id = TRB_TO_SLOT_ID(le32_to_cpu(event->flags));
2453 ep = xhci_get_virt_ep(xhci, slot_id, ep_index);
2459 xdev = xhci->devs[slot_id];
2466 slot_id, ep_index);
2492 slot_id, ep_index);
2518 slot_id, ep_index);
2524 slot_id, ep_index);
2529 slot_id, ep_index);
2534 slot_id, ep_index);
2538 xhci_dbg(xhci, "Stalled endpoint for slot %u ep %u\n", slot_id,
2545 slot_id, ep_index);
2550 slot_id, ep_index);
2555 slot_id, ep_index);
2562 slot_id, ep_index);
2569 slot_id, ep_index);
2575 slot_id, ep_index);
2580 slot_id, ep_index);
2613 slot_id, ep_index);
2619 slot_id, ep_index);
2626 slot_id, ep_index);
2636 trb_comp_code, slot_id, ep_index);
2663 slot_id, ep_index);
2680 slot_id, ep_index);
2772 slot_id, ep_index);
3261 static void giveback_first_trb(struct xhci_hcd *xhci, int slot_id,
3274 xhci_ring_ep_doorbell(xhci, slot_id, ep_index, stream_id);
3314 struct urb *urb, int slot_id, unsigned int ep_index)
3318 ep_ctx = xhci_get_ep_ctx(xhci, xhci->devs[slot_id]->out_ctx, ep_index);
3321 return xhci_queue_bulk_tx(xhci, mem_flags, urb, slot_id, ep_index);
3442 struct urb *urb, int slot_id, unsigned int ep_index)
3476 ret = prepare_transfer(xhci, xhci->devs[slot_id],
3585 ret = prepare_transfer(xhci, xhci->devs[slot_id],
3596 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
3603 struct urb *urb, int slot_id, unsigned int ep_index)
3635 ret = prepare_transfer(xhci, xhci->devs[slot_id],
3731 giveback_first_trb(xhci, slot_id, ep_index, 0,
3900 struct urb *urb, int slot_id, unsigned int ep_index)
3917 xep = &xhci->devs[slot_id]->eps[ep_index];
3918 ep_ring = xhci->devs[slot_id]->eps[ep_index].ring;
3953 ret = prepare_transfer(xhci, xhci->devs[slot_id], ep_index,
4058 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
4093 struct urb *urb, int slot_id, unsigned int ep_index)
4104 xdev = xhci->devs[slot_id];
4105 xep = &xhci->devs[slot_id]->eps[ep_index];
4164 return xhci_queue_isoc_tx(xhci, mem_flags, urb, slot_id, ep_index);
4220 u32 trb_type, u32 slot_id)
4223 TRB_TYPE(trb_type) | SLOT_ID_FOR_TRB(slot_id), false);
4228 dma_addr_t in_ctx_ptr, u32 slot_id, enum xhci_setup_dev setup)
4232 TRB_TYPE(TRB_ADDR_DEV) | SLOT_ID_FOR_TRB(slot_id)
4244 u32 slot_id)
4247 TRB_TYPE(TRB_RESET_DEV) | SLOT_ID_FOR_TRB(slot_id),
4254 u32 slot_id, bool command_must_succeed)
4258 TRB_TYPE(TRB_CONFIG_EP) | SLOT_ID_FOR_TRB(slot_id),
4264 dma_addr_t in_ctx_ptr, u32 slot_id, bool command_must_succeed)
4268 TRB_TYPE(TRB_EVAL_CONTEXT) | SLOT_ID_FOR_TRB(slot_id),
4277 int slot_id, unsigned int ep_index, int suspend)
4279 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id);
4290 unsigned int slot_id, unsigned int ep_index,
4294 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id);
4320 ep = &xhci->devs[slot_id]->eps[ep_index];
4354 int slot_id, unsigned int ep_index,
4357 u32 trb_slot_id = SLOT_ID_FOR_TRB(slot_id);