aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Tikhomirov <av.tikhomirov@samsung.com>2011-04-21 04:06:42 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-02 20:00:26 -0400
commitf8acb08d8a1b2edab352430bd32c0e694bc65bc5 (patch)
tree7cae8ea40fe2d0cf87af913ccafa6261eed4399a
parent9c39ddc60ee9eb70569d1658e512cfa232b9dd16 (diff)
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 <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>
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c5
1 files changed, 0 insertions, 5 deletions
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)
2447 2447
2448 dev_info(hs->dev, "ep_dequeue(%p,%p)\n", ep, req); 2448 dev_info(hs->dev, "ep_dequeue(%p,%p)\n", ep, req);
2449 2449
2450 if (hs_req == hs_ep->req) {
2451 dev_dbg(hs->dev, "%s: already in progress\n", __func__);
2452 return -EINPROGRESS;
2453 }
2454
2455 spin_lock_irqsave(&hs_ep->lock, flags); 2450 spin_lock_irqsave(&hs_ep->lock, flags);
2456 2451
2457 if (!on_list(hs_ep, hs_req)) { 2452 if (!on_list(hs_ep, hs_req)) {