Lines Matching refs:virt_dev

1427 	struct xhci_virt_device	*virt_dev;  in xhci_check_args()  local
1446 virt_dev = xhci->devs[udev->slot_id]; in xhci_check_args()
1447 if (virt_dev->udev != udev) { in xhci_check_args()
1904 struct xhci_virt_device *virt_dev; in xhci_add_endpoint() local
1928 virt_dev = xhci->devs[udev->slot_id]; in xhci_add_endpoint()
1929 in_ctx = virt_dev->in_ctx; in xhci_add_endpoint()
1941 if (virt_dev->eps[ep_index].ring && in xhci_add_endpoint()
1963 if (xhci_endpoint_init(xhci, virt_dev, udev, ep, GFP_NOIO) < 0) { in xhci_add_endpoint()
1983 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); in xhci_add_endpoint()
1995 static void xhci_zero_in_ctx(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev) in xhci_zero_in_ctx() argument
2002 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_zero_in_ctx()
2016 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx); in xhci_zero_in_ctx()
2021 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, i); in xhci_zero_in_ctx()
2269 struct xhci_virt_device *virt_dev, in xhci_check_tt_bw_table() argument
2276 bw_table = &xhci->rh_bw[virt_dev->rhub_port->hw_portnum].bw_table; in xhci_check_tt_bw_table()
2277 tt_info = virt_dev->tt_info; in xhci_check_tt_bw_table()
2299 struct xhci_virt_device *virt_dev) in xhci_check_ss_bw() argument
2304 if (virt_dev->bw_table->ss_bw_in > (SS_BW_LIMIT_IN - bw_reserved)) in xhci_check_ss_bw()
2308 if (virt_dev->bw_table->ss_bw_out > (SS_BW_LIMIT_OUT - bw_reserved)) in xhci_check_ss_bw()
2356 struct xhci_virt_device *virt_dev, in xhci_check_bw_table() argument
2370 if (virt_dev->udev->speed >= USB_SPEED_SUPER) in xhci_check_bw_table()
2371 return xhci_check_ss_bw(xhci, virt_dev); in xhci_check_bw_table()
2373 if (virt_dev->udev->speed == USB_SPEED_HIGH) { in xhci_check_bw_table()
2382 bw_table = virt_dev->bw_table; in xhci_check_bw_table()
2386 block_size = xhci_get_block_size(virt_dev->udev); in xhci_check_bw_table()
2391 if (virt_dev->tt_info) { in xhci_check_bw_table()
2394 virt_dev->rhub_port->hw_portnum + 1); in xhci_check_bw_table()
2395 if (xhci_check_tt_bw_table(xhci, virt_dev, old_active_eps)) { in xhci_check_bw_table()
2402 virt_dev->tt_info->slot_id, in xhci_check_bw_table()
2403 virt_dev->tt_info->ttport); in xhci_check_bw_table()
2407 virt_dev->rhub_port->hw_portnum + 1); in xhci_check_bw_table()
2503 if (!virt_dev->tt_info && virt_dev->udev->speed == USB_SPEED_HIGH) { in xhci_check_bw_table()
2509 xhci->rh_bw[virt_dev->rhub_port->hw_portnum].num_active_tts; in xhci_check_bw_table()
2689 struct xhci_virt_device *virt_dev, in xhci_update_tt_active_eps() argument
2693 if (!virt_dev->tt_info) in xhci_update_tt_active_eps()
2696 rh_bw_info = &xhci->rh_bw[virt_dev->rhub_port->hw_portnum]; in xhci_update_tt_active_eps()
2698 virt_dev->tt_info->active_eps != 0) { in xhci_update_tt_active_eps()
2702 virt_dev->tt_info->active_eps == 0) { in xhci_update_tt_active_eps()
2709 struct xhci_virt_device *virt_dev, in xhci_reserve_bandwidth() argument
2717 if (virt_dev->tt_info) in xhci_reserve_bandwidth()
2718 old_active_eps = virt_dev->tt_info->active_eps; in xhci_reserve_bandwidth()
2732 memcpy(&ep_bw_info[i], &virt_dev->eps[i].bw_info, in xhci_reserve_bandwidth()
2739 &virt_dev->eps[i].bw_info, in xhci_reserve_bandwidth()
2740 virt_dev->bw_table, in xhci_reserve_bandwidth()
2741 virt_dev->udev, in xhci_reserve_bandwidth()
2742 &virt_dev->eps[i], in xhci_reserve_bandwidth()
2743 virt_dev->tt_info); in xhci_reserve_bandwidth()
2746 xhci_update_bw_info(xhci, virt_dev->in_ctx, ctrl_ctx, virt_dev); in xhci_reserve_bandwidth()
2751 &virt_dev->eps[i].bw_info, in xhci_reserve_bandwidth()
2752 virt_dev->bw_table, in xhci_reserve_bandwidth()
2753 virt_dev->udev, in xhci_reserve_bandwidth()
2754 &virt_dev->eps[i], in xhci_reserve_bandwidth()
2755 virt_dev->tt_info); in xhci_reserve_bandwidth()
2758 if (!xhci_check_bw_table(xhci, virt_dev, old_active_eps)) { in xhci_reserve_bandwidth()
2762 xhci_update_tt_active_eps(xhci, virt_dev, old_active_eps); in xhci_reserve_bandwidth()
2776 &virt_dev->eps[i].bw_info, in xhci_reserve_bandwidth()
2777 virt_dev->bw_table, in xhci_reserve_bandwidth()
2778 virt_dev->udev, in xhci_reserve_bandwidth()
2779 &virt_dev->eps[i], in xhci_reserve_bandwidth()
2780 virt_dev->tt_info); in xhci_reserve_bandwidth()
2783 memcpy(&virt_dev->eps[i].bw_info, &ep_bw_info[i], in xhci_reserve_bandwidth()
2788 &virt_dev->eps[i].bw_info, in xhci_reserve_bandwidth()
2789 virt_dev->bw_table, in xhci_reserve_bandwidth()
2790 virt_dev->udev, in xhci_reserve_bandwidth()
2791 &virt_dev->eps[i], in xhci_reserve_bandwidth()
2792 virt_dev->tt_info); in xhci_reserve_bandwidth()
2809 struct xhci_virt_device *virt_dev; in xhci_configure_endpoint() local
2822 virt_dev = xhci->devs[udev->slot_id]; in xhci_configure_endpoint()
2841 xhci_reserve_bandwidth(xhci, virt_dev, command->in_ctx)) { in xhci_configure_endpoint()
2926 struct xhci_virt_device *virt_dev; in xhci_check_bandwidth() local
2940 virt_dev = xhci->devs[udev->slot_id]; in xhci_check_bandwidth()
2946 command->in_ctx = virt_dev->in_ctx; in xhci_check_bandwidth()
2967 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx); in xhci_check_bandwidth()
2971 if ((virt_dev->eps[i-1].ring && !(ctrl_ctx->drop_flags & le32)) in xhci_check_bandwidth()
2989 xhci_free_endpoint_ring(xhci, virt_dev, i); in xhci_check_bandwidth()
2990 xhci_check_bw_drop_ep_streams(xhci, virt_dev, i); in xhci_check_bandwidth()
2993 xhci_zero_in_ctx(xhci, virt_dev); in xhci_check_bandwidth()
2999 if (!virt_dev->eps[i].new_ring) in xhci_check_bandwidth()
3004 if (virt_dev->eps[i].ring) { in xhci_check_bandwidth()
3005 xhci_free_endpoint_ring(xhci, virt_dev, i); in xhci_check_bandwidth()
3007 xhci_check_bw_drop_ep_streams(xhci, virt_dev, i); in xhci_check_bandwidth()
3008 virt_dev->eps[i].ring = virt_dev->eps[i].new_ring; in xhci_check_bandwidth()
3009 virt_dev->eps[i].new_ring = NULL; in xhci_check_bandwidth()
3010 xhci_debugfs_create_endpoint(xhci, virt_dev, i); in xhci_check_bandwidth()
3023 struct xhci_virt_device *virt_dev; in xhci_reset_bandwidth() local
3032 virt_dev = xhci->devs[udev->slot_id]; in xhci_reset_bandwidth()
3035 if (virt_dev->eps[i].new_ring) { in xhci_reset_bandwidth()
3036 xhci_debugfs_remove_endpoint(xhci, virt_dev, i); in xhci_reset_bandwidth()
3037 xhci_ring_free(xhci, virt_dev->eps[i].new_ring); in xhci_reset_bandwidth()
3038 virt_dev->eps[i].new_ring = NULL; in xhci_reset_bandwidth()
3041 xhci_zero_in_ctx(xhci, virt_dev); in xhci_reset_bandwidth()
3674 struct xhci_virt_device *virt_dev, bool drop_control_ep) in xhci_free_device_endpoint_resources() argument
3681 if (virt_dev->eps[i].ring) { in xhci_free_device_endpoint_resources()
3720 struct xhci_virt_device *virt_dev; in xhci_discover_or_reset_device() local
3730 virt_dev = xhci->devs[slot_id]; in xhci_discover_or_reset_device()
3731 if (!virt_dev) { in xhci_discover_or_reset_device()
3741 if (virt_dev->tt_info) in xhci_discover_or_reset_device()
3742 old_active_eps = virt_dev->tt_info->active_eps; in xhci_discover_or_reset_device()
3744 if (virt_dev->udev != udev) { in xhci_discover_or_reset_device()
3760 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx); in xhci_discover_or_reset_device()
3810 xhci_get_slot_state(xhci, virt_dev->out_ctx)); in xhci_discover_or_reset_device()
3831 xhci_free_device_endpoint_resources(xhci, virt_dev, false); in xhci_discover_or_reset_device()
3837 struct xhci_virt_ep *ep = &virt_dev->eps[i]; in xhci_discover_or_reset_device()
3848 xhci_debugfs_remove_endpoint(xhci, virt_dev, i); in xhci_discover_or_reset_device()
3849 xhci_free_endpoint_ring(xhci, virt_dev, i); in xhci_discover_or_reset_device()
3851 if (!list_empty(&virt_dev->eps[i].bw_endpoint_list)) in xhci_discover_or_reset_device()
3853 &virt_dev->eps[i].bw_info, in xhci_discover_or_reset_device()
3854 virt_dev->bw_table, in xhci_discover_or_reset_device()
3856 &virt_dev->eps[i], in xhci_discover_or_reset_device()
3857 virt_dev->tt_info); in xhci_discover_or_reset_device()
3858 xhci_clear_endpoint_bw_info(&virt_dev->eps[i].bw_info); in xhci_discover_or_reset_device()
3861 xhci_update_tt_active_eps(xhci, virt_dev, old_active_eps); in xhci_discover_or_reset_device()
3862 virt_dev->flags = 0; in xhci_discover_or_reset_device()
3878 struct xhci_virt_device *virt_dev; in xhci_free_dev() local
3898 virt_dev = xhci->devs[udev->slot_id]; in xhci_free_dev()
3899 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx); in xhci_free_dev()
3904 virt_dev->eps[i].ep_state &= ~EP_STOP_CMD_PENDING; in xhci_free_dev()
3905 virt_dev->udev = NULL; in xhci_free_dev()
4085 struct xhci_virt_device *virt_dev; in xhci_setup_device() local
4107 virt_dev = xhci->devs[udev->slot_id]; in xhci_setup_device()
4109 if (WARN_ON(!virt_dev)) { in xhci_setup_device()
4120 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx); in xhci_setup_device()
4137 command->in_ctx = virt_dev->in_ctx; in xhci_setup_device()
4140 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx); in xhci_setup_device()
4141 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_setup_device()
4161 trace_xhci_address_ctx(xhci, virt_dev->in_ctx, in xhci_setup_device()
4166 trace_xhci_setup_device(virt_dev); in xhci_setup_device()
4167 ret = xhci_queue_address_device(xhci, command, virt_dev->in_ctx->dma, in xhci_setup_device()
4223 trace_xhci_address_ctx(xhci, virt_dev->out_ctx, 1); in xhci_setup_device()
4240 (unsigned long long)virt_dev->out_ctx->dma); in xhci_setup_device()
4241 trace_xhci_address_ctx(xhci, virt_dev->in_ctx, in xhci_setup_device()
4247 trace_xhci_address_ctx(xhci, virt_dev->out_ctx, in xhci_setup_device()
4252 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx); in xhci_setup_device()
4300 struct xhci_virt_device *virt_dev; in xhci_change_max_exit_latency() local
4313 virt_dev = xhci->devs[udev->slot_id]; in xhci_change_max_exit_latency()
4321 if (!virt_dev || max_exit_latency == virt_dev->current_mel) { in xhci_change_max_exit_latency()
4337 xhci_slot_copy(xhci, command->in_ctx, virt_dev->out_ctx); in xhci_change_max_exit_latency()
4355 virt_dev->current_mel = max_exit_latency; in xhci_change_max_exit_latency()