diff options
| author | Guido Kiener <guido@kiener-muenchen.de> | 2019-03-18 04:18:34 -0400 |
|---|---|---|
| committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-03-20 02:50:42 -0400 |
| commit | 091dacc3cc10979ab0422f0a9f7fcc27eee97e69 (patch) | |
| tree | e0407a82eb2bce2c02aace5e15b6c9a4dd97987e /drivers | |
| parent | f1d3fba17cd4eeea20397f1324b7b9c69a6a935c (diff) | |
usb: gadget: net2272: Fix net2272_dequeue()
Restore the status of ep->stopped in function net2272_dequeue().
When the given request is not found in the endpoint queue
the function returns -EINVAL without restoring the state of
ep->stopped. Thus the endpoint keeps blocked and does not transfer
any data anymore.
This fix is only compile-tested, since we do not have a
corresponding hardware. An analogous fix was tested in the sibling
driver. See "usb: gadget: net2280: Fix net2280_dequeue()"
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/usb/gadget/udc/net2272.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index b77f3126580e..c2011cd7df8c 100644 --- a/drivers/usb/gadget/udc/net2272.c +++ b/drivers/usb/gadget/udc/net2272.c | |||
| @@ -945,6 +945,7 @@ net2272_dequeue(struct usb_ep *_ep, struct usb_request *_req) | |||
| 945 | break; | 945 | break; |
| 946 | } | 946 | } |
| 947 | if (&req->req != _req) { | 947 | if (&req->req != _req) { |
| 948 | ep->stopped = stopped; | ||
| 948 | spin_unlock_irqrestore(&ep->dev->lock, flags); | 949 | spin_unlock_irqrestore(&ep->dev->lock, flags); |
| 949 | return -EINVAL; | 950 | return -EINVAL; |
| 950 | } | 951 | } |
