From: Anton Tikhomirov Date: Thu, 21 Apr 2011 08:06:42 +0000 (+0900) Subject: USB: s3c-hsotg: Fix hang up after reset X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8acb08d8a1b2edab352430bd32c0e694bc65bc5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git USB: s3c-hsotg: Fix hang up after reset 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 Reviewed-by: Kyoungil Kim Cc: Ben Dooks Signed-off-by: Kukjin Kim Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 6be424e2cc60..ea38d3067801 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -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)) {