]> git.hungrycats.org Git - linux/commitdiff
USB: xHCI: re-initialize cmd_completion
authorAndiry Xu <andiry.xu@amd.com>
Fri, 12 Mar 2010 09:10:04 +0000 (17:10 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:01:37 +0000 (16:01 -0700)
commit 1d68064a7d80da4a7334cab0356162e36229c1a1 upstream.

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 <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-hcd.c

index 5e92c72df6420d025573850890d89319b12cd043..fa920c7ed029304117d6a530b3cf953db531f2a6 100644 (file)
@@ -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,