summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGuido Kiener <guido@kiener-muenchen.de>2019-03-18 11:18:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-04 10:15:19 +0300
commit5aedac453b9bb16a00087cc6cd6f2138c8366f37 (patch)
treedf1bdfc4d8bfaec5777067f9a5c98145666e0c1e /drivers
parent12d9d2e9ce986f89d86686559d29ac4a3fba674a (diff)
downloadlinux-5aedac453b9bb16a00087cc6cd6f2138c8366f37.tar.xz
usb: gadget: net2272: Fix net2272_dequeue()
[ Upstream commit 091dacc3cc10979ab0422f0a9f7fcc27eee97e69 ] 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> Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/udc/net2272.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c
index e0759a826b60..7fb31a3b53e6 100644
--- a/drivers/usb/gadget/udc/net2272.c
+++ b/drivers/usb/gadget/udc/net2272.c
@@ -958,6 +958,7 @@ net2272_dequeue(struct usb_ep *_ep, struct usb_request *_req)
break;
}
if (&req->req != _req) {
+ ep->stopped = stopped;
spin_unlock_irqrestore(&ep->dev->lock, flags);
return -EINVAL;
}