Lines Matching refs:command
94 cmd = readl(&xhci->op_regs->command); in xhci_quiesce()
96 writel(cmd, &xhci->op_regs->command); in xhci_quiesce()
132 temp = readl(&xhci->op_regs->command); in xhci_start()
136 writel(temp, &xhci->op_regs->command); in xhci_start()
164 u32 command; in xhci_reset() local
175 command = readl(&xhci->op_regs->command); in xhci_reset()
176 command |= CMD_RESET; in xhci_reset()
177 writel(command, &xhci->op_regs->command); in xhci_reset()
189 ret = xhci_handshake(&xhci->op_regs->command, in xhci_reset()
642 temp = readl(&xhci->op_regs->command); in xhci_run()
646 writel(temp, &xhci->op_regs->command); in xhci_run()
656 struct xhci_command *command; in xhci_run() local
657 command = xhci_alloc_command(xhci, false, false, GFP_KERNEL); in xhci_run()
658 if (!command) in xhci_run()
660 xhci_queue_vendor_command(xhci, command, 0, 0, 0, in xhci_run()
765 xhci->s3.command = readl(&xhci->op_regs->command); in xhci_save_registers()
778 writel(xhci->s3.command, &xhci->op_regs->command); in xhci_restore_registers()
898 u32 command; in xhci_suspend() local
925 command = readl(&xhci->op_regs->command); in xhci_suspend()
926 command &= ~CMD_RUN; in xhci_suspend()
927 writel(command, &xhci->op_regs->command); in xhci_suspend()
944 command = readl(&xhci->op_regs->command); in xhci_suspend()
945 command |= CMD_CSS; in xhci_suspend()
946 writel(command, &xhci->op_regs->command); in xhci_suspend()
983 u32 command, temp = 0, status; in xhci_resume() local
1014 command = readl(&xhci->op_regs->command); in xhci_resume()
1015 command |= CMD_CRS; in xhci_resume()
1016 writel(command, &xhci->op_regs->command); in xhci_resume()
1085 command = readl(&xhci->op_regs->command); in xhci_resume()
1086 command |= CMD_RUN; in xhci_resume()
1087 writel(command, &xhci->op_regs->command); in xhci_resume()
1236 struct usb_device *udev, struct xhci_command *command,
1251 struct xhci_command *command; in xhci_check_maxpacket() local
1277 command = xhci_alloc_command(xhci, false, true, GFP_KERNEL); in xhci_check_maxpacket()
1278 if (!command) in xhci_check_maxpacket()
1281 command->in_ctx = xhci->devs[slot_id]->in_ctx; in xhci_check_maxpacket()
1282 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_maxpacket()
1293 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_check_maxpacket()
1301 xhci_dbg_ctx(xhci, command->in_ctx, ep_index); in xhci_check_maxpacket()
1305 ret = xhci_configure_endpoint(xhci, urb->dev, command, in xhci_check_maxpacket()
1313 kfree(command->completion); in xhci_check_maxpacket()
1314 kfree(command); in xhci_check_maxpacket()
1540 struct xhci_command *command; in xhci_urb_dequeue() local
1612 command = xhci_alloc_command(xhci, false, false, GFP_ATOMIC); in xhci_urb_dequeue()
1613 if (!command) { in xhci_urb_dequeue()
1622 xhci_queue_stop_endpoint(xhci, command, urb->dev->slot_id, in xhci_urb_dequeue()
2637 struct xhci_command *command, in xhci_configure_endpoint() argument
2645 if (!command) in xhci_configure_endpoint()
2651 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_configure_endpoint()
2668 xhci_reserve_bandwidth(xhci, virt_dev, command->in_ctx)) { in xhci_configure_endpoint()
2677 ret = xhci_queue_configure_endpoint(xhci, command, in xhci_configure_endpoint()
2678 command->in_ctx->dma, in xhci_configure_endpoint()
2681 ret = xhci_queue_evaluate_context(xhci, command, in xhci_configure_endpoint()
2682 command->in_ctx->dma, in xhci_configure_endpoint()
2696 wait_for_completion(command->completion); in xhci_configure_endpoint()
2700 &command->status); in xhci_configure_endpoint()
2703 &command->status); in xhci_configure_endpoint()
2751 struct xhci_command *command; in xhci_check_bandwidth() local
2764 command = xhci_alloc_command(xhci, false, true, GFP_KERNEL); in xhci_check_bandwidth()
2765 if (!command) in xhci_check_bandwidth()
2768 command->in_ctx = virt_dev->in_ctx; in xhci_check_bandwidth()
2771 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_check_bandwidth()
2804 ret = xhci_configure_endpoint(xhci, udev, command, in xhci_check_bandwidth()
2841 kfree(command->completion); in xhci_check_bandwidth()
2842 kfree(command); in xhci_check_bandwidth()
3317 struct xhci_command *command; in xhci_free_streams() local
3340 command = vdev->eps[ep_index].stream_info->free_streams_command; in xhci_free_streams()
3341 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_free_streams()
3353 ep_ctx = xhci_get_ep_ctx(xhci, command->in_ctx, ep_index); in xhci_free_streams()
3357 xhci_endpoint_copy(xhci, command->in_ctx, in xhci_free_streams()
3362 xhci_setup_input_ctx_for_config_ep(xhci, command->in_ctx, in xhci_free_streams()
3370 ret = xhci_configure_endpoint(xhci, udev, command, in xhci_free_streams()
3612 struct xhci_command *command; in xhci_free_dev() local
3614 command = xhci_alloc_command(xhci, false, false, GFP_KERNEL); in xhci_free_dev()
3615 if (!command) in xhci_free_dev()
3633 kfree(command); in xhci_free_dev()
3652 kfree(command); in xhci_free_dev()
3656 if (xhci_queue_slot_control(xhci, command, TRB_DISABLE_SLOT, in xhci_free_dev()
3703 struct xhci_command *command; in xhci_alloc_dev() local
3705 command = xhci_alloc_command(xhci, false, false, GFP_KERNEL); in xhci_alloc_dev()
3706 if (!command) in xhci_alloc_dev()
3712 command->completion = &xhci->addr_dev; in xhci_alloc_dev()
3713 ret = xhci_queue_slot_control(xhci, command, TRB_ENABLE_SLOT, 0); in xhci_alloc_dev()
3718 kfree(command); in xhci_alloc_dev()
3724 wait_for_completion(command->completion); in xhci_alloc_dev()
3728 if (!slot_id || command->status != COMP_SUCCESS) { in xhci_alloc_dev()
3733 kfree(command); in xhci_alloc_dev()
3769 kfree(command); in xhci_alloc_dev()
3777 command->completion = NULL; in xhci_alloc_dev()
3778 command->status = 0; in xhci_alloc_dev()
3779 if (!xhci_queue_slot_control(xhci, command, TRB_DISABLE_SLOT, in xhci_alloc_dev()
3801 struct xhci_command *command = NULL; in xhci_setup_device() local
3838 command = xhci_alloc_command(xhci, false, false, GFP_KERNEL); in xhci_setup_device()
3839 if (!command) { in xhci_setup_device()
3844 command->in_ctx = virt_dev->in_ctx; in xhci_setup_device()
3845 command->completion = &xhci->addr_dev; in xhci_setup_device()
3874 ret = xhci_queue_address_device(xhci, command, virt_dev->in_ctx->dma, in xhci_setup_device()
3886 wait_for_completion(command->completion); in xhci_setup_device()
3892 switch (command->status) { in xhci_setup_device()
3920 act, command->status); in xhci_setup_device()
3963 kfree(command); in xhci_setup_device()
4007 struct xhci_command *command; in xhci_change_max_exit_latency() local
4029 command = xhci->lpm_command; in xhci_change_max_exit_latency()
4030 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx); in xhci_change_max_exit_latency()
4038 xhci_slot_copy(xhci, command->in_ctx, virt_dev->out_ctx); in xhci_change_max_exit_latency()
4042 slot_ctx = xhci_get_slot_ctx(xhci, command->in_ctx); in xhci_change_max_exit_latency()
4050 xhci_dbg_ctx(xhci, command->in_ctx, 0); in xhci_change_max_exit_latency()
4053 ret = xhci_configure_endpoint(xhci, udev, command, in xhci_change_max_exit_latency()