Lines Matching refs:ctrl_ctx
1419 struct xhci_input_control_ctx *ctrl_ctx; in xhci_check_maxpacket() local
1452 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_maxpacket()
1453 if (!ctrl_ctx) { in xhci_check_maxpacket()
1468 ctrl_ctx->add_flags = cpu_to_le32(EP0_FLAG); in xhci_check_maxpacket()
1469 ctrl_ctx->drop_flags = 0; in xhci_check_maxpacket()
1477 ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG); in xhci_check_maxpacket()
1781 struct xhci_input_control_ctx *ctrl_ctx; in xhci_drop_endpoint() local
1805 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_drop_endpoint()
1806 if (!ctrl_ctx) { in xhci_drop_endpoint()
1818 le32_to_cpu(ctrl_ctx->drop_flags) & in xhci_drop_endpoint()
1827 ctrl_ctx->drop_flags |= cpu_to_le32(drop_flag); in xhci_drop_endpoint()
1828 new_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags); in xhci_drop_endpoint()
1830 ctrl_ctx->add_flags &= cpu_to_le32(~drop_flag); in xhci_drop_endpoint()
1831 new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); in xhci_drop_endpoint()
1865 struct xhci_input_control_ctx *ctrl_ctx; in xhci_add_endpoint() local
1895 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_add_endpoint()
1896 if (!ctrl_ctx) { in xhci_add_endpoint()
1907 !(le32_to_cpu(ctrl_ctx->drop_flags) & added_ctxs)) { in xhci_add_endpoint()
1917 if (le32_to_cpu(ctrl_ctx->add_flags) & added_ctxs) { in xhci_add_endpoint()
1934 ctrl_ctx->add_flags |= cpu_to_le32(added_ctxs); in xhci_add_endpoint()
1935 new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); in xhci_add_endpoint()
1943 new_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags); in xhci_add_endpoint()
1962 struct xhci_input_control_ctx *ctrl_ctx; in xhci_zero_in_ctx() local
1967 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_zero_in_ctx()
1968 if (!ctrl_ctx) { in xhci_zero_in_ctx()
1979 ctrl_ctx->drop_flags = 0; in xhci_zero_in_ctx()
1980 ctrl_ctx->add_flags = 0; in xhci_zero_in_ctx()
2095 struct xhci_input_control_ctx *ctrl_ctx) in xhci_count_num_new_endpoints() argument
2104 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2; in xhci_count_num_new_endpoints()
2105 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2; in xhci_count_num_new_endpoints()
2116 struct xhci_input_control_ctx *ctrl_ctx) in xhci_count_num_dropped_endpoints() argument
2121 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2; in xhci_count_num_dropped_endpoints()
2122 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2; in xhci_count_num_dropped_endpoints()
2142 struct xhci_input_control_ctx *ctrl_ctx) in xhci_reserve_host_resources() argument
2146 added_eps = xhci_count_num_new_endpoints(xhci, ctrl_ctx); in xhci_reserve_host_resources()
2169 struct xhci_input_control_ctx *ctrl_ctx) in xhci_free_host_resources() argument
2173 num_failed_eps = xhci_count_num_new_endpoints(xhci, ctrl_ctx); in xhci_free_host_resources()
2188 struct xhci_input_control_ctx *ctrl_ctx) in xhci_finish_resource_reservation() argument
2192 num_dropped_eps = xhci_count_num_dropped_endpoints(xhci, ctrl_ctx); in xhci_finish_resource_reservation()
2688 struct xhci_input_control_ctx *ctrl_ctx; in xhci_reserve_bandwidth() local
2694 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_reserve_bandwidth()
2695 if (!ctrl_ctx) { in xhci_reserve_bandwidth()
2702 if (!EP_IS_ADDED(ctrl_ctx, i) && !EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2711 if (EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2720 xhci_update_bw_info(xhci, virt_dev->in_ctx, ctrl_ctx, virt_dev); in xhci_reserve_bandwidth()
2723 if (EP_IS_ADDED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2742 if (!EP_IS_ADDED(ctrl_ctx, i) && !EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2748 if (EP_IS_ADDED(ctrl_ctx, i)) { in xhci_reserve_bandwidth()
2760 if (EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2782 struct xhci_input_control_ctx *ctrl_ctx; in xhci_configure_endpoint() local
2798 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_configure_endpoint()
2799 if (!ctrl_ctx) { in xhci_configure_endpoint()
2807 xhci_reserve_host_resources(xhci, ctrl_ctx)) { in xhci_configure_endpoint()
2817 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
2825 trace_xhci_configure_endpoint_ctrl_ctx(ctrl_ctx); in xhci_configure_endpoint()
2838 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
2863 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
2865 xhci_finish_resource_reservation(xhci, ctrl_ctx); in xhci_configure_endpoint()
2909 struct xhci_input_control_ctx *ctrl_ctx; in xhci_check_bandwidth() local
2931 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_bandwidth()
2932 if (!ctrl_ctx) { in xhci_check_bandwidth()
2938 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_check_bandwidth()
2939 ctrl_ctx->add_flags &= cpu_to_le32(~EP0_FLAG); in xhci_check_bandwidth()
2940 ctrl_ctx->drop_flags &= cpu_to_le32(~(SLOT_FLAG | EP0_FLAG)); in xhci_check_bandwidth()
2943 if (ctrl_ctx->add_flags == cpu_to_le32(SLOT_FLAG) && in xhci_check_bandwidth()
2944 ctrl_ctx->drop_flags == 0) { in xhci_check_bandwidth()
2953 if ((virt_dev->eps[i-1].ring && !(ctrl_ctx->drop_flags & le32)) in xhci_check_bandwidth()
2954 || (ctrl_ctx->add_flags & le32) || i == 1) { in xhci_check_bandwidth()
2969 if ((le32_to_cpu(ctrl_ctx->drop_flags) & (1 << (i + 1))) && in xhci_check_bandwidth()
2970 !(le32_to_cpu(ctrl_ctx->add_flags) & (1 << (i + 1)))) { in xhci_check_bandwidth()
3034 struct xhci_input_control_ctx *ctrl_ctx, in xhci_setup_input_ctx_for_config_ep() argument
3037 ctrl_ctx->add_flags = cpu_to_le32(add_flags); in xhci_setup_input_ctx_for_config_ep()
3038 ctrl_ctx->drop_flags = cpu_to_le32(drop_flags); in xhci_setup_input_ctx_for_config_ep()
3040 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_setup_input_ctx_for_config_ep()
3104 struct xhci_input_control_ctx *ctrl_ctx; in xhci_endpoint_reset() local
3198 ctrl_ctx = xhci_get_input_control_ctx(cfg_cmd->in_ctx); in xhci_endpoint_reset()
3199 if (!ctrl_ctx) { in xhci_endpoint_reset()
3208 ctrl_ctx, ep_flag, ep_flag); in xhci_endpoint_reset()
3403 struct xhci_input_control_ctx *ctrl_ctx; in xhci_alloc_streams() local
3432 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx); in xhci_alloc_streams()
3433 if (!ctrl_ctx) { in xhci_alloc_streams()
3507 vdev->out_ctx, ctrl_ctx, in xhci_alloc_streams()
3570 struct xhci_input_control_ctx *ctrl_ctx; in xhci_free_streams() local
3593 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_free_streams()
3594 if (!ctrl_ctx) { in xhci_free_streams()
3615 vdev->out_ctx, ctrl_ctx, in xhci_free_streams()
4075 struct xhci_input_control_ctx *ctrl_ctx; in xhci_setup_device() local
4126 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_setup_device()
4127 if (!ctrl_ctx) { in xhci_setup_device()
4143 ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG | EP0_FLAG); in xhci_setup_device()
4144 ctrl_ctx->drop_flags = 0; in xhci_setup_device()
4149 trace_xhci_address_ctrl_ctx(ctrl_ctx); in xhci_setup_device()
4240 ctrl_ctx->add_flags = 0; in xhci_setup_device()
4241 ctrl_ctx->drop_flags = 0; in xhci_setup_device()
4291 struct xhci_input_control_ctx *ctrl_ctx; in xhci_change_max_exit_latency() local
4313 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_change_max_exit_latency()
4314 if (!ctrl_ctx) { in xhci_change_max_exit_latency()
4332 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_change_max_exit_latency()
5079 struct xhci_input_control_ctx *ctrl_ctx; in xhci_update_hub_device() local
5099 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx); in xhci_update_hub_device()
5100 if (!ctrl_ctx) { in xhci_update_hub_device()
5126 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_update_hub_device()