Lines Matching refs:ctrl_ctx
1413 struct xhci_input_control_ctx *ctrl_ctx; in xhci_check_maxpacket() local
1446 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_maxpacket()
1447 if (!ctrl_ctx) { in xhci_check_maxpacket()
1462 ctrl_ctx->add_flags = cpu_to_le32(EP0_FLAG); in xhci_check_maxpacket()
1463 ctrl_ctx->drop_flags = 0; in xhci_check_maxpacket()
1471 ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG); in xhci_check_maxpacket()
1765 struct xhci_input_control_ctx *ctrl_ctx; in xhci_drop_endpoint() local
1789 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_drop_endpoint()
1790 if (!ctrl_ctx) { in xhci_drop_endpoint()
1802 le32_to_cpu(ctrl_ctx->drop_flags) & in xhci_drop_endpoint()
1811 ctrl_ctx->drop_flags |= cpu_to_le32(drop_flag); in xhci_drop_endpoint()
1812 new_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags); in xhci_drop_endpoint()
1814 ctrl_ctx->add_flags &= cpu_to_le32(~drop_flag); in xhci_drop_endpoint()
1815 new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); in xhci_drop_endpoint()
1849 struct xhci_input_control_ctx *ctrl_ctx; in xhci_add_endpoint() local
1879 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_add_endpoint()
1880 if (!ctrl_ctx) { in xhci_add_endpoint()
1891 !(le32_to_cpu(ctrl_ctx->drop_flags) & added_ctxs)) { in xhci_add_endpoint()
1901 if (le32_to_cpu(ctrl_ctx->add_flags) & added_ctxs) { in xhci_add_endpoint()
1918 ctrl_ctx->add_flags |= cpu_to_le32(added_ctxs); in xhci_add_endpoint()
1919 new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); in xhci_add_endpoint()
1927 new_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags); in xhci_add_endpoint()
1946 struct xhci_input_control_ctx *ctrl_ctx; in xhci_zero_in_ctx() local
1951 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_zero_in_ctx()
1952 if (!ctrl_ctx) { in xhci_zero_in_ctx()
1963 ctrl_ctx->drop_flags = 0; in xhci_zero_in_ctx()
1964 ctrl_ctx->add_flags = 0; in xhci_zero_in_ctx()
2079 struct xhci_input_control_ctx *ctrl_ctx) in xhci_count_num_new_endpoints() argument
2088 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2; in xhci_count_num_new_endpoints()
2089 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2; in xhci_count_num_new_endpoints()
2100 struct xhci_input_control_ctx *ctrl_ctx) in xhci_count_num_dropped_endpoints() argument
2105 valid_add_flags = le32_to_cpu(ctrl_ctx->add_flags) >> 2; in xhci_count_num_dropped_endpoints()
2106 valid_drop_flags = le32_to_cpu(ctrl_ctx->drop_flags) >> 2; in xhci_count_num_dropped_endpoints()
2126 struct xhci_input_control_ctx *ctrl_ctx) in xhci_reserve_host_resources() argument
2130 added_eps = xhci_count_num_new_endpoints(xhci, ctrl_ctx); in xhci_reserve_host_resources()
2153 struct xhci_input_control_ctx *ctrl_ctx) in xhci_free_host_resources() argument
2157 num_failed_eps = xhci_count_num_new_endpoints(xhci, ctrl_ctx); in xhci_free_host_resources()
2172 struct xhci_input_control_ctx *ctrl_ctx) in xhci_finish_resource_reservation() argument
2176 num_dropped_eps = xhci_count_num_dropped_endpoints(xhci, ctrl_ctx); in xhci_finish_resource_reservation()
2665 struct xhci_input_control_ctx *ctrl_ctx; in xhci_reserve_bandwidth() local
2671 ctrl_ctx = xhci_get_input_control_ctx(in_ctx); in xhci_reserve_bandwidth()
2672 if (!ctrl_ctx) { in xhci_reserve_bandwidth()
2679 if (!EP_IS_ADDED(ctrl_ctx, i) && !EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2688 if (EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2697 xhci_update_bw_info(xhci, virt_dev->in_ctx, ctrl_ctx, virt_dev); in xhci_reserve_bandwidth()
2700 if (EP_IS_ADDED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2719 if (!EP_IS_ADDED(ctrl_ctx, i) && !EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2725 if (EP_IS_ADDED(ctrl_ctx, i)) { in xhci_reserve_bandwidth()
2737 if (EP_IS_DROPPED(ctrl_ctx, i)) in xhci_reserve_bandwidth()
2759 struct xhci_input_control_ctx *ctrl_ctx; in xhci_configure_endpoint() local
2775 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_configure_endpoint()
2776 if (!ctrl_ctx) { in xhci_configure_endpoint()
2784 xhci_reserve_host_resources(xhci, ctrl_ctx)) { in xhci_configure_endpoint()
2794 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
2802 trace_xhci_configure_endpoint_ctrl_ctx(ctrl_ctx); in xhci_configure_endpoint()
2815 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
2840 xhci_free_host_resources(xhci, ctrl_ctx); in xhci_configure_endpoint()
2842 xhci_finish_resource_reservation(xhci, ctrl_ctx); in xhci_configure_endpoint()
2878 struct xhci_input_control_ctx *ctrl_ctx; in xhci_check_bandwidth() local
2900 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_bandwidth()
2901 if (!ctrl_ctx) { in xhci_check_bandwidth()
2907 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_check_bandwidth()
2908 ctrl_ctx->add_flags &= cpu_to_le32(~EP0_FLAG); in xhci_check_bandwidth()
2909 ctrl_ctx->drop_flags &= cpu_to_le32(~(SLOT_FLAG | EP0_FLAG)); in xhci_check_bandwidth()
2912 if (ctrl_ctx->add_flags == cpu_to_le32(SLOT_FLAG) && in xhci_check_bandwidth()
2913 ctrl_ctx->drop_flags == 0) { in xhci_check_bandwidth()
2922 if ((virt_dev->eps[i-1].ring && !(ctrl_ctx->drop_flags & le32)) in xhci_check_bandwidth()
2923 || (ctrl_ctx->add_flags & le32) || i == 1) { in xhci_check_bandwidth()
2938 if ((le32_to_cpu(ctrl_ctx->drop_flags) & (1 << (i + 1))) && in xhci_check_bandwidth()
2939 !(le32_to_cpu(ctrl_ctx->add_flags) & (1 << (i + 1)))) { in xhci_check_bandwidth()
2999 struct xhci_input_control_ctx *ctrl_ctx, in xhci_setup_input_ctx_for_config_ep() argument
3002 ctrl_ctx->add_flags = cpu_to_le32(add_flags); in xhci_setup_input_ctx_for_config_ep()
3003 ctrl_ctx->drop_flags = cpu_to_le32(drop_flags); in xhci_setup_input_ctx_for_config_ep()
3005 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_setup_input_ctx_for_config_ep()
3067 struct xhci_input_control_ctx *ctrl_ctx; in xhci_endpoint_reset() local
3152 ctrl_ctx = xhci_get_input_control_ctx(cfg_cmd->in_ctx); in xhci_endpoint_reset()
3153 if (!ctrl_ctx) { in xhci_endpoint_reset()
3162 ctrl_ctx, ep_flag, ep_flag); in xhci_endpoint_reset()
3352 struct xhci_input_control_ctx *ctrl_ctx; in xhci_alloc_streams() local
3381 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx); in xhci_alloc_streams()
3382 if (!ctrl_ctx) { in xhci_alloc_streams()
3456 vdev->out_ctx, ctrl_ctx, in xhci_alloc_streams()
3519 struct xhci_input_control_ctx *ctrl_ctx; in xhci_free_streams() local
3542 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_free_streams()
3543 if (!ctrl_ctx) { in xhci_free_streams()
3564 vdev->out_ctx, ctrl_ctx, in xhci_free_streams()
4013 struct xhci_input_control_ctx *ctrl_ctx; in xhci_setup_device() local
4064 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); in xhci_setup_device()
4065 if (!ctrl_ctx) { in xhci_setup_device()
4081 ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG | EP0_FLAG); in xhci_setup_device()
4082 ctrl_ctx->drop_flags = 0; in xhci_setup_device()
4087 trace_xhci_address_ctrl_ctx(ctrl_ctx); in xhci_setup_device()
4171 ctrl_ctx->add_flags = 0; in xhci_setup_device()
4172 ctrl_ctx->drop_flags = 0; in xhci_setup_device()
4221 struct xhci_input_control_ctx *ctrl_ctx; in xhci_change_max_exit_latency() local
4247 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_change_max_exit_latency()
4248 if (!ctrl_ctx) { in xhci_change_max_exit_latency()
4259 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_change_max_exit_latency()
4968 struct xhci_input_control_ctx *ctrl_ctx; in xhci_update_hub_device() local
4988 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx); in xhci_update_hub_device()
4989 if (!ctrl_ctx) { in xhci_update_hub_device()
5006 ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG); in xhci_update_hub_device()