From: Vahram Aharonyan Date: Tue, 24 May 2016 05:41:59 +0000 (-0700) Subject: UPSTREAM: usb: dwc2: gadget: Do not halt isochronous endpoints X-Git-Tag: firefly_0821_release~852 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4e33319307db8610f6b5f941dbe622145d8f5f1f;p=firefly-linux-kernel-4.4.55.git UPSTREAM: usb: dwc2: gadget: Do not halt isochronous endpoints Add a check in dwc2_hsotg_ep_sethalt() so that it does not halt isochronous endpoints. Change-Id: I72d5cf2ba7fb6cfa8ab8e33d16c4e3b33ce31e4f Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn Signed-off-by: Felipe Balbi Signed-off-by: Huang, Tao (cherry picked from commit 15186f1011b088432a10f435aa6e2df5ab177503) --- diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index e4e2a9031dee..26cf09d0fe3c 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2974,6 +2974,11 @@ static int dwc2_hsotg_ep_sethalt(struct usb_ep *ep, int value, bool now) return 0; } + if (hs_ep->isochronous) { + dev_err(hs->dev, "%s is Isochronous Endpoint\n", ep->name); + return -EINVAL; + } + if (!now && value && !list_empty(&hs_ep->queue)) { dev_dbg(hs->dev, "%s request is pending, cannot halt\n", ep->name);