提交 1d68064a 编写于 作者: A Andiry Xu 提交者: Greg Kroah-Hartman

USB: xHCI: re-initialize cmd_completion

When a signal interrupts a Configure Endpoint command, the cmd_completion used
in xhci_configure_endpoint() is not re-initialized and the
wait_for_completion_interruptible_timeout() will return failure. Initialize
cmd_completion in xhci_configure_endpoint().
Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 bc75fa38
...@@ -1173,6 +1173,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci, ...@@ -1173,6 +1173,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
cmd_completion = &virt_dev->cmd_completion; cmd_completion = &virt_dev->cmd_completion;
cmd_status = &virt_dev->cmd_status; cmd_status = &virt_dev->cmd_status;
} }
init_completion(cmd_completion);
if (!ctx_change) if (!ctx_change)
ret = xhci_queue_configure_endpoint(xhci, in_ctx->dma, ret = xhci_queue_configure_endpoint(xhci, in_ctx->dma,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册