Lines Matching refs:ctrl_ctx
1573 struct xhci_input_control_ctx *ctrl_ctx; in xhci_check_maxpacket() local
1606 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_maxpacket()
1607 if (!ctrl_ctx) { in xhci_check_maxpacket()
1622 ctrl_ctx->add_flags = cpu_to_le32(EP0_FLAG); in xhci_check_maxpacket()
1623 ctrl_ctx->drop_flags = 0; in xhci_check_maxpacket()
1631 ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG); in xhci_check_maxpacket()
1928 struct xhci_input_control_ctx *ctrl_ctx; in xhci_drop_endpoint() local
1952 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_drop_endpoint()
1953 if (!ctrl_ctx) { in xhci_drop_endpoint()
1965 le32_to_cpu(ctrl_ctx->drop_flags) & in xhci_drop_endpoint()
1974 ctrl_ctx->drop_flags |= cpu_to_le32(drop_flag); in xhci_drop_endpoint()
1975 new_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags); in xhci_drop_endpoint()
1977 ctrl_ctx->add_flags &= cpu_to_le32(~drop_flag); in xhci_drop_endpoint()
1978 new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); in xhci_drop_endpoint()
2012 struct xhci_input_control_ctx *ctrl_ctx; in xhci_add_endpoint() local
2042 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_add_endpoint()
2043 if (!ctrl_ctx) { in xhci_add_endpoint()
2054 !(le32_to_cpu(ctrl_ctx->drop_flags) & added_ctxs)) { in xhci_add_endpoint()
2064 if (le32_to_cpu(ctrl_ctx->add_flags) & added_ctxs) { in xhci_add_endpoint()
2081 ctrl_ctx->add_flags |= cpu_to_le32(added_ctxs); in xhci_add_endpoint()
2082 new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); in xhci_add_endpoint()
2090 new_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags); in xhci_add_endpoint()
2109 struct xhci_input_control_ctx *ctrl_ctx; in xhci_zero_in_ctx() local
2114 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_zero_in_ctx()
2115 if (!ctrl_ctx) { in xhci_zero_in_ctx()
2126 ctrl_ctx->drop_flags = 0; in xhci_zero_in_ctx()
2127 ctrl_ctx->add_flags = 0; in xhci_zero_in_ctx()
2242 struct xhci_input_control_ctx *ctrl_ctx) in xhci_count_num_new_endpoints() argument
2251 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2; in xhci_count_num_new_endpoints()
2252 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2; in xhci_count_num_new_endpoints()
2263 struct xhci_input_control_ctx *ctrl_ctx) in xhci_count_num_dropped_endpoints() argument
2268 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2; in xhci_count_num_dropped_endpoints()
2269 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2; in xhci_count_num_dropped_endpoints()
2289 struct xhci_input_control_ctx *ctrl_ctx) in xhci_reserve_host_resources() argument
2293 added_eps = xhci_count_num_new_endpoints(xhci, ctrl_ctx); in xhci_reserve_host_resources()
2316 struct xhci_input_control_ctx *ctrl_ctx) in xhci_free_host_resources() argument
2320 num_failed_eps = xhci_count_num_new_endpoints(xhci, ctrl_ctx); in xhci_free_host_resources()
2335 struct xhci_input_control_ctx *ctrl_ctx) in xhci_finish_resource_reservation() argument
2339 num_dropped_eps = xhci_count_num_dropped_endpoints(xhci, ctrl_ctx); in xhci_finish_resource_reservation()
2835 struct xhci_input_control_ctx *ctrl_ctx; in xhci_reserve_bandwidth() local
2841 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_reserve_bandwidth()
2842 if (!ctrl_ctx) { in xhci_reserve_bandwidth()
2849 if (!EP_IS_ADDED(ctrl_ctx, i) && !EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2858 if (EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2867 xhci_update_bw_info(xhci, virt_dev->in_ctx, ctrl_ctx, virt_dev); in xhci_reserve_bandwidth()
2870 if (EP_IS_ADDED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2889 if (!EP_IS_ADDED(ctrl_ctx, i) && !EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2895 if (EP_IS_ADDED(ctrl_ctx, i)) { in xhci_reserve_bandwidth()
2907 if (EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2929 struct xhci_input_control_ctx *ctrl_ctx; in xhci_configure_endpoint() local
2945 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_configure_endpoint()
2946 if (!ctrl_ctx) { in xhci_configure_endpoint()
2954 xhci_reserve_host_resources(xhci, ctrl_ctx)) { in xhci_configure_endpoint()
2964 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
2972 trace_xhci_configure_endpoint_ctrl_ctx(ctrl_ctx); in xhci_configure_endpoint()
2985 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
3010 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
3012 xhci_finish_resource_reservation(xhci, ctrl_ctx); in xhci_configure_endpoint()
3048 struct xhci_input_control_ctx *ctrl_ctx; in xhci_check_bandwidth() local
3070 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_bandwidth()
3071 if (!ctrl_ctx) { in xhci_check_bandwidth()
3077 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_check_bandwidth()
3078 ctrl_ctx->add_flags &= cpu_to_le32(~EP0_FLAG); in xhci_check_bandwidth()
3079 ctrl_ctx->drop_flags &= cpu_to_le32(~(SLOT_FLAG | EP0_FLAG)); in xhci_check_bandwidth()
3082 if (ctrl_ctx->add_flags == cpu_to_le32(SLOT_FLAG) && in xhci_check_bandwidth()
3083 ctrl_ctx->drop_flags == 0) { in xhci_check_bandwidth()
3092 if ((virt_dev->eps[i-1].ring && !(ctrl_ctx->drop_flags & le32)) in xhci_check_bandwidth()
3093 || (ctrl_ctx->add_flags & le32) || i == 1) { in xhci_check_bandwidth()
3108 if ((le32_to_cpu(ctrl_ctx->drop_flags) & (1 << (i + 1))) && in xhci_check_bandwidth()
3109 !(le32_to_cpu(ctrl_ctx->add_flags) & (1 << (i + 1)))) { in xhci_check_bandwidth()
3169 struct xhci_input_control_ctx *ctrl_ctx, in xhci_setup_input_ctx_for_config_ep() argument
3172 ctrl_ctx->add_flags = cpu_to_le32(add_flags); in xhci_setup_input_ctx_for_config_ep()
3173 ctrl_ctx->drop_flags = cpu_to_le32(drop_flags); in xhci_setup_input_ctx_for_config_ep()
3175 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_setup_input_ctx_for_config_ep()
3239 struct xhci_input_control_ctx *ctrl_ctx; in xhci_endpoint_reset() local
3326 ctrl_ctx = xhci_get_input_control_ctx(cfg_cmd->in_ctx); in xhci_endpoint_reset()
3327 if (!ctrl_ctx) { in xhci_endpoint_reset()
3336 ctrl_ctx, ep_flag, ep_flag); in xhci_endpoint_reset()
3526 struct xhci_input_control_ctx *ctrl_ctx; in xhci_alloc_streams() local
3555 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx); in xhci_alloc_streams()
3556 if (!ctrl_ctx) { in xhci_alloc_streams()
3630 vdev->out_ctx, ctrl_ctx, in xhci_alloc_streams()
3693 struct xhci_input_control_ctx *ctrl_ctx; in xhci_free_streams() local
3716 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_free_streams()
3717 if (!ctrl_ctx) { in xhci_free_streams()
3738 vdev->out_ctx, ctrl_ctx, in xhci_free_streams()
4188 struct xhci_input_control_ctx *ctrl_ctx; in xhci_setup_device() local
4239 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_setup_device()
4240 if (!ctrl_ctx) { in xhci_setup_device()
4256 ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG | EP0_FLAG); in xhci_setup_device()
4257 ctrl_ctx->drop_flags = 0; in xhci_setup_device()
4262 trace_xhci_address_ctrl_ctx(ctrl_ctx); in xhci_setup_device()
4346 ctrl_ctx->add_flags = 0; in xhci_setup_device()
4347 ctrl_ctx->drop_flags = 0; in xhci_setup_device()
4396 struct xhci_input_control_ctx *ctrl_ctx; in xhci_change_max_exit_latency() local
4418 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_change_max_exit_latency()
4419 if (!ctrl_ctx) { in xhci_change_max_exit_latency()
4429 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_change_max_exit_latency()
5159 struct xhci_input_control_ctx *ctrl_ctx; in xhci_update_hub_device() local
5179 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx); in xhci_update_hub_device()
5180 if (!ctrl_ctx) { in xhci_update_hub_device()
5197 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_update_hub_device()