From: Andiry Xu Date: Fri, 12 Mar 2010 09:10:04 +0000 (+0800) Subject: USB: xHCI: re-initialize cmd_completion X-Git-Tag: v3.0~5395^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d68064a7d80da4a7334cab0356162e36229c1a1;p=platform%2Fkernel%2Flinux-amlogic.git 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: Andiry Xu Signed-off-by: Sarah Sharp Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 4cb69e0..492a61c 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1173,6 +1173,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci, cmd_completion = &virt_dev->cmd_completion; cmd_status = &virt_dev->cmd_status; } + init_completion(cmd_completion); if (!ctx_change) ret = xhci_queue_configure_endpoint(xhci, in_ctx->dma,