USB: s3c-hsotg: Fix hang up after reset
authorAnton Tikhomirov <av.tikhomirov@samsung.com>
Thu, 21 Apr 2011 08:06:42 +0000 (17:06 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 3 May 2011 00:00:26 +0000 (17:00 -0700)
When File Storage gadget receives SET CONFIGURATION request it tries
to cancel all pending transfers. If some request is in progress,
gadget waits for its completion. This commit allows gadget to dequeue
invalid requests in progress left after reset.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/s3c-hsotg.c

index 6be424e2cc6043184f387e5faee21814824d40a9..ea38d3067801e3f6af6b09f3207efd8c8aad3b59 100644 (file)
@@ -2447,11 +2447,6 @@ static int s3c_hsotg_ep_dequeue(struct usb_ep *ep, struct usb_request *req)
 
        dev_info(hs->dev, "ep_dequeue(%p,%p)\n", ep, req);
 
-       if (hs_req == hs_ep->req) {
-               dev_dbg(hs->dev, "%s: already in progress\n", __func__);
-               return -EINPROGRESS;
-       }
-
        spin_lock_irqsave(&hs_ep->lock, flags);
 
        if (!on_list(hs_ep, hs_req)) {