usb: dwc2: gadget: Do not halt isochronous endpoints
authorVahram Aharonyan <vahrama@synopsys.com>
Tue, 24 May 2016 05:41:59 +0000 (22:41 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 31 May 2016 08:12:57 +0000 (11:12 +0300)
Add a check in dwc2_hsotg_ep_sethalt() so that it does not halt
isochronous endpoints.

Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c

index e4e2a9031deed0a59bd9a8c93dddb8e78c4191b2..26cf09d0fe3ce330ed65ac8dfa3dc4c38d809769 100644 (file)
@@ -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);