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()
1925 struct xhci_input_control_ctx *ctrl_ctx; in xhci_drop_endpoint() local
1949 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_drop_endpoint()
1950 if (!ctrl_ctx) { in xhci_drop_endpoint()
1962 le32_to_cpu(ctrl_ctx->drop_flags) & in xhci_drop_endpoint()
1971 ctrl_ctx->drop_flags |= cpu_to_le32(drop_flag); in xhci_drop_endpoint()
1972 new_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags); in xhci_drop_endpoint()
1974 ctrl_ctx->add_flags &= cpu_to_le32(~drop_flag); in xhci_drop_endpoint()
1975 new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); in xhci_drop_endpoint()
2009 struct xhci_input_control_ctx *ctrl_ctx; in xhci_add_endpoint() local
2039 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_add_endpoint()
2040 if (!ctrl_ctx) { in xhci_add_endpoint()
2051 !(le32_to_cpu(ctrl_ctx->drop_flags) & added_ctxs)) { in xhci_add_endpoint()
2061 if (le32_to_cpu(ctrl_ctx->add_flags) & added_ctxs) { in xhci_add_endpoint()
2078 ctrl_ctx->add_flags |= cpu_to_le32(added_ctxs); in xhci_add_endpoint()
2079 new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); in xhci_add_endpoint()
2087 new_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags); in xhci_add_endpoint()
2106 struct xhci_input_control_ctx *ctrl_ctx; in xhci_zero_in_ctx() local
2111 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_zero_in_ctx()
2112 if (!ctrl_ctx) { in xhci_zero_in_ctx()
2123 ctrl_ctx->drop_flags = 0; in xhci_zero_in_ctx()
2124 ctrl_ctx->add_flags = 0; in xhci_zero_in_ctx()
2239 struct xhci_input_control_ctx *ctrl_ctx) in xhci_count_num_new_endpoints() argument
2248 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2; in xhci_count_num_new_endpoints()
2249 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2; in xhci_count_num_new_endpoints()
2260 struct xhci_input_control_ctx *ctrl_ctx) in xhci_count_num_dropped_endpoints() argument
2265 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2; in xhci_count_num_dropped_endpoints()
2266 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2; in xhci_count_num_dropped_endpoints()
2286 struct xhci_input_control_ctx *ctrl_ctx) in xhci_reserve_host_resources() argument
2290 added_eps = xhci_count_num_new_endpoints(xhci, ctrl_ctx); in xhci_reserve_host_resources()
2313 struct xhci_input_control_ctx *ctrl_ctx) in xhci_free_host_resources() argument
2317 num_failed_eps = xhci_count_num_new_endpoints(xhci, ctrl_ctx); in xhci_free_host_resources()
2332 struct xhci_input_control_ctx *ctrl_ctx) in xhci_finish_resource_reservation() argument
2336 num_dropped_eps = xhci_count_num_dropped_endpoints(xhci, ctrl_ctx); in xhci_finish_resource_reservation()
2832 struct xhci_input_control_ctx *ctrl_ctx; in xhci_reserve_bandwidth() local
2838 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_reserve_bandwidth()
2839 if (!ctrl_ctx) { in xhci_reserve_bandwidth()
2846 if (!EP_IS_ADDED(ctrl_ctx, i) && !EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2855 if (EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2864 xhci_update_bw_info(xhci, virt_dev->in_ctx, ctrl_ctx, virt_dev); in xhci_reserve_bandwidth()
2867 if (EP_IS_ADDED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2886 if (!EP_IS_ADDED(ctrl_ctx, i) && !EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2892 if (EP_IS_ADDED(ctrl_ctx, i)) { in xhci_reserve_bandwidth()
2904 if (EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2926 struct xhci_input_control_ctx *ctrl_ctx; in xhci_configure_endpoint() local
2942 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_configure_endpoint()
2943 if (!ctrl_ctx) { in xhci_configure_endpoint()
2951 xhci_reserve_host_resources(xhci, ctrl_ctx)) { in xhci_configure_endpoint()
2961 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
2969 trace_xhci_configure_endpoint_ctrl_ctx(ctrl_ctx); in xhci_configure_endpoint()
2982 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
3007 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
3009 xhci_finish_resource_reservation(xhci, ctrl_ctx); in xhci_configure_endpoint()
3045 struct xhci_input_control_ctx *ctrl_ctx; in xhci_check_bandwidth() local
3067 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_bandwidth()
3068 if (!ctrl_ctx) { in xhci_check_bandwidth()
3074 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_check_bandwidth()
3075 ctrl_ctx->add_flags &= cpu_to_le32(~EP0_FLAG); in xhci_check_bandwidth()
3076 ctrl_ctx->drop_flags &= cpu_to_le32(~(SLOT_FLAG | EP0_FLAG)); in xhci_check_bandwidth()
3079 if (ctrl_ctx->add_flags == cpu_to_le32(SLOT_FLAG) && in xhci_check_bandwidth()
3080 ctrl_ctx->drop_flags == 0) { in xhci_check_bandwidth()
3089 if ((virt_dev->eps[i-1].ring && !(ctrl_ctx->drop_flags & le32)) in xhci_check_bandwidth()
3090 || (ctrl_ctx->add_flags & le32) || i == 1) { in xhci_check_bandwidth()
3105 if ((le32_to_cpu(ctrl_ctx->drop_flags) & (1 << (i + 1))) && in xhci_check_bandwidth()
3106 !(le32_to_cpu(ctrl_ctx->add_flags) & (1 << (i + 1)))) { in xhci_check_bandwidth()
3166 struct xhci_input_control_ctx *ctrl_ctx, in xhci_setup_input_ctx_for_config_ep() argument
3169 ctrl_ctx->add_flags = cpu_to_le32(add_flags); in xhci_setup_input_ctx_for_config_ep()
3170 ctrl_ctx->drop_flags = cpu_to_le32(drop_flags); in xhci_setup_input_ctx_for_config_ep()
3172 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_setup_input_ctx_for_config_ep()
3234 struct xhci_input_control_ctx *ctrl_ctx; in xhci_endpoint_reset() local
3319 ctrl_ctx = xhci_get_input_control_ctx(cfg_cmd->in_ctx); in xhci_endpoint_reset()
3320 if (!ctrl_ctx) { in xhci_endpoint_reset()
3329 ctrl_ctx, ep_flag, ep_flag); in xhci_endpoint_reset()
3519 struct xhci_input_control_ctx *ctrl_ctx; in xhci_alloc_streams() local
3548 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx); in xhci_alloc_streams()
3549 if (!ctrl_ctx) { in xhci_alloc_streams()
3623 vdev->out_ctx, ctrl_ctx, in xhci_alloc_streams()
3686 struct xhci_input_control_ctx *ctrl_ctx; in xhci_free_streams() local
3709 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_free_streams()
3710 if (!ctrl_ctx) { in xhci_free_streams()
3731 vdev->out_ctx, ctrl_ctx, in xhci_free_streams()
4175 struct xhci_input_control_ctx *ctrl_ctx; in xhci_setup_device() local
4226 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_setup_device()
4227 if (!ctrl_ctx) { in xhci_setup_device()
4243 ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG | EP0_FLAG); in xhci_setup_device()
4244 ctrl_ctx->drop_flags = 0; in xhci_setup_device()
4249 trace_xhci_address_ctrl_ctx(ctrl_ctx); in xhci_setup_device()
4333 ctrl_ctx->add_flags = 0; in xhci_setup_device()
4334 ctrl_ctx->drop_flags = 0; in xhci_setup_device()
4383 struct xhci_input_control_ctx *ctrl_ctx; in xhci_change_max_exit_latency() local
4408 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_change_max_exit_latency()
4409 if (!ctrl_ctx) { in xhci_change_max_exit_latency()
4420 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_change_max_exit_latency()
5128 struct xhci_input_control_ctx *ctrl_ctx; in xhci_update_hub_device() local
5148 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx); in xhci_update_hub_device()
5149 if (!ctrl_ctx) { in xhci_update_hub_device()
5166 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_update_hub_device()