diff options
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 349cacc577d8..490a6ca00733 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -527,7 +527,7 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep, | |||
527 | dep->stream_capable = true; | 527 | dep->stream_capable = true; |
528 | } | 528 | } |
529 | 529 | ||
530 | if (usb_endpoint_xfer_isoc(desc)) | 530 | if (!usb_endpoint_xfer_control(desc)) |
531 | params.param1 |= DWC3_DEPCFG_XFER_IN_PROGRESS_EN; | 531 | params.param1 |= DWC3_DEPCFG_XFER_IN_PROGRESS_EN; |
532 | 532 | ||
533 | /* | 533 | /* |
@@ -1225,16 +1225,17 @@ static int dwc3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request, | |||
1225 | 1225 | ||
1226 | int ret; | 1226 | int ret; |
1227 | 1227 | ||
1228 | spin_lock_irqsave(&dwc->lock, flags); | ||
1228 | if (!dep->endpoint.desc) { | 1229 | if (!dep->endpoint.desc) { |
1229 | dev_dbg(dwc->dev, "trying to queue request %p to disabled %s\n", | 1230 | dev_dbg(dwc->dev, "trying to queue request %p to disabled %s\n", |
1230 | request, ep->name); | 1231 | request, ep->name); |
1232 | spin_unlock_irqrestore(&dwc->lock, flags); | ||
1231 | return -ESHUTDOWN; | 1233 | return -ESHUTDOWN; |
1232 | } | 1234 | } |
1233 | 1235 | ||
1234 | dev_vdbg(dwc->dev, "queing request %p to %s length %d\n", | 1236 | dev_vdbg(dwc->dev, "queing request %p to %s length %d\n", |
1235 | request, ep->name, request->length); | 1237 | request, ep->name, request->length); |
1236 | 1238 | ||
1237 | spin_lock_irqsave(&dwc->lock, flags); | ||
1238 | ret = __dwc3_gadget_ep_queue(dep, req); | 1239 | ret = __dwc3_gadget_ep_queue(dep, req); |
1239 | spin_unlock_irqrestore(&dwc->lock, flags); | 1240 | spin_unlock_irqrestore(&dwc->lock, flags); |
1240 | 1241 | ||
@@ -2041,12 +2042,6 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, | |||
2041 | dwc3_endpoint_transfer_complete(dwc, dep, event); | 2042 | dwc3_endpoint_transfer_complete(dwc, dep, event); |
2042 | break; | 2043 | break; |
2043 | case DWC3_DEPEVT_XFERINPROGRESS: | 2044 | case DWC3_DEPEVT_XFERINPROGRESS: |
2044 | if (!usb_endpoint_xfer_isoc(dep->endpoint.desc)) { | ||
2045 | dev_dbg(dwc->dev, "%s is not an Isochronous endpoint\n", | ||
2046 | dep->name); | ||
2047 | return; | ||
2048 | } | ||
2049 | |||
2050 | dwc3_endpoint_transfer_complete(dwc, dep, event); | 2045 | dwc3_endpoint_transfer_complete(dwc, dep, event); |
2051 | break; | 2046 | break; |
2052 | case DWC3_DEPEVT_XFERNOTREADY: | 2047 | case DWC3_DEPEVT_XFERNOTREADY: |