Lines Matching refs:virt_dev

1387 	struct xhci_virt_device	*virt_dev;
1406 virt_dev = xhci->devs[udev->slot_id];
1407 if (virt_dev->udev != udev) {
1409 "virt_dev does not match\n", func);
1876 struct xhci_virt_device *virt_dev;
1900 virt_dev = xhci->devs[udev->slot_id];
1901 in_ctx = virt_dev->in_ctx;
1913 if (virt_dev->eps[ep_index].ring &&
1935 if (xhci_endpoint_init(xhci, virt_dev, udev, ep, GFP_NOIO) < 0) {
1944 xhci_ring_free(xhci, virt_dev->eps[ep_index].new_ring);
1945 virt_dev->eps[ep_index].new_ring = NULL;
1964 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index);
1975 static void xhci_zero_in_ctx(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev)
1982 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx);
1996 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx);
2001 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, i);
2250 struct xhci_virt_device *virt_dev,
2257 bw_table = &xhci->rh_bw[virt_dev->real_port - 1].bw_table;
2258 tt_info = virt_dev->tt_info;
2280 struct xhci_virt_device *virt_dev)
2285 if (virt_dev->bw_table->ss_bw_in > (SS_BW_LIMIT_IN - bw_reserved))
2289 if (virt_dev->bw_table->ss_bw_out > (SS_BW_LIMIT_OUT - bw_reserved))
2337 struct xhci_virt_device *virt_dev,
2351 if (virt_dev->udev->speed >= USB_SPEED_SUPER)
2352 return xhci_check_ss_bw(xhci, virt_dev);
2354 if (virt_dev->udev->speed == USB_SPEED_HIGH) {
2363 bw_table = virt_dev->bw_table;
2367 block_size = xhci_get_block_size(virt_dev->udev);
2372 if (virt_dev->tt_info) {
2375 virt_dev->real_port);
2376 if (xhci_check_tt_bw_table(xhci, virt_dev, old_active_eps)) {
2383 virt_dev->tt_info->slot_id,
2384 virt_dev->tt_info->ttport);
2388 virt_dev->real_port);
2484 if (!virt_dev->tt_info && virt_dev->udev->speed == USB_SPEED_HIGH) {
2485 unsigned int port_index = virt_dev->real_port - 1;
2678 struct xhci_virt_device *virt_dev,
2682 if (!virt_dev->tt_info)
2685 rh_bw_info = &xhci->rh_bw[virt_dev->real_port - 1];
2687 virt_dev->tt_info->active_eps != 0) {
2691 virt_dev->tt_info->active_eps == 0) {
2698 struct xhci_virt_device *virt_dev,
2706 if (virt_dev->tt_info)
2707 old_active_eps = virt_dev->tt_info->active_eps;
2721 memcpy(&ep_bw_info[i], &virt_dev->eps[i].bw_info,
2728 &virt_dev->eps[i].bw_info,
2729 virt_dev->bw_table,
2730 virt_dev->udev,
2731 &virt_dev->eps[i],
2732 virt_dev->tt_info);
2735 xhci_update_bw_info(xhci, virt_dev->in_ctx, ctrl_ctx, virt_dev);
2740 &virt_dev->eps[i].bw_info,
2741 virt_dev->bw_table,
2742 virt_dev->udev,
2743 &virt_dev->eps[i],
2744 virt_dev->tt_info);
2747 if (!xhci_check_bw_table(xhci, virt_dev, old_active_eps)) {
2751 xhci_update_tt_active_eps(xhci, virt_dev, old_active_eps);
2765 &virt_dev->eps[i].bw_info,
2766 virt_dev->bw_table,
2767 virt_dev->udev,
2768 &virt_dev->eps[i],
2769 virt_dev->tt_info);
2772 memcpy(&virt_dev->eps[i].bw_info, &ep_bw_info[i],
2777 &virt_dev->eps[i].bw_info,
2778 virt_dev->bw_table,
2779 virt_dev->udev,
2780 &virt_dev->eps[i],
2781 virt_dev->tt_info);
2798 struct xhci_virt_device *virt_dev;
2811 virt_dev = xhci->devs[udev->slot_id];
2830 xhci_reserve_bandwidth(xhci, virt_dev, command->in_ctx)) {
2915 struct xhci_virt_device *virt_dev;
2929 virt_dev = xhci->devs[udev->slot_id];
2935 command->in_ctx = virt_dev->in_ctx;
2956 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx);
2960 if ((virt_dev->eps[i-1].ring && !(ctrl_ctx->drop_flags & le32))
2978 xhci_free_endpoint_ring(xhci, virt_dev, i);
2979 xhci_check_bw_drop_ep_streams(xhci, virt_dev, i);
2982 xhci_zero_in_ctx(xhci, virt_dev);
2988 if (!virt_dev->eps[i].new_ring)
2993 if (virt_dev->eps[i].ring) {
2994 xhci_free_endpoint_ring(xhci, virt_dev, i);
2996 xhci_check_bw_drop_ep_streams(xhci, virt_dev, i);
2997 virt_dev->eps[i].ring = virt_dev->eps[i].new_ring;
2998 virt_dev->eps[i].new_ring = NULL;
2999 xhci_debugfs_create_endpoint(xhci, virt_dev, i);
3011 struct xhci_virt_device *virt_dev;
3020 virt_dev = xhci->devs[udev->slot_id];
3023 if (virt_dev->eps[i].new_ring) {
3024 xhci_debugfs_remove_endpoint(xhci, virt_dev, i);
3025 xhci_ring_free(xhci, virt_dev->eps[i].new_ring);
3026 virt_dev->eps[i].new_ring = NULL;
3029 xhci_zero_in_ctx(xhci, virt_dev);
3722 struct xhci_virt_device *virt_dev, bool drop_control_ep)
3729 if (virt_dev->eps[i].ring) {
3756 * If the virt_dev to be reset does not exist or does not match the udev,
3768 struct xhci_virt_device *virt_dev;
3778 virt_dev = xhci->devs[slot_id];
3779 if (!virt_dev) {
3789 if (virt_dev->tt_info)
3790 old_active_eps = virt_dev->tt_info->active_eps;
3792 if (virt_dev->udev != udev) {
3793 /* If the virt_dev and the udev does not match, this virt_dev
3808 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx);
3858 xhci_get_slot_state(xhci, virt_dev->out_ctx));
3879 xhci_free_device_endpoint_resources(xhci, virt_dev, false);
3885 struct xhci_virt_ep *ep = &virt_dev->eps[i];
3896 xhci_debugfs_remove_endpoint(xhci, virt_dev, i);
3897 xhci_free_endpoint_ring(xhci, virt_dev, i);
3899 if (!list_empty(&virt_dev->eps[i].bw_endpoint_list))
3901 &virt_dev->eps[i].bw_info,
3902 virt_dev->bw_table,
3904 &virt_dev->eps[i],
3905 virt_dev->tt_info);
3906 xhci_clear_endpoint_bw_info(&virt_dev->eps[i].bw_info);
3909 xhci_update_tt_active_eps(xhci, virt_dev, old_active_eps);
3910 virt_dev->flags = 0;
3926 struct xhci_virt_device *virt_dev;
3946 virt_dev = xhci->devs[udev->slot_id];
3947 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx);
3952 virt_dev->eps[i].ep_state &= ~EP_STOP_CMD_PENDING;
3953 del_timer_sync(&virt_dev->eps[i].stop_cmd_timer);
3955 virt_dev->udev = NULL;
4128 struct xhci_virt_device *virt_dev;
4150 virt_dev = xhci->devs[udev->slot_id];
4152 if (WARN_ON(!virt_dev)) {
4155 * a zero-dereference was observed once due to virt_dev = 0.
4163 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx);
4180 command->in_ctx = virt_dev->in_ctx;
4182 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx);
4183 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx);
4203 trace_xhci_address_ctx(xhci, virt_dev->in_ctx,
4208 trace_xhci_setup_device(virt_dev);
4209 ret = xhci_queue_address_device(xhci, command, virt_dev->in_ctx->dma,
4265 trace_xhci_address_ctx(xhci, virt_dev->out_ctx, 1);
4282 (unsigned long long)virt_dev->out_ctx->dma);
4283 trace_xhci_address_ctx(xhci, virt_dev->in_ctx,
4289 trace_xhci_address_ctx(xhci, virt_dev->out_ctx,
4294 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->out_ctx);
4340 struct xhci_virt_device *virt_dev;
4349 virt_dev = xhci->devs[udev->slot_id];
4352 * virt_dev might not exists yet if xHC resumed from hibernate (S4) and
4357 if (!virt_dev || max_exit_latency == virt_dev->current_mel) {
4372 xhci_slot_copy(xhci, command->in_ctx, virt_dev->out_ctx);
4390 virt_dev->current_mel = max_exit_latency;