Skip to content

Commit 091dacc

Browse files
GuidoKienerFelipe Balbi
authored andcommitted
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>
1 parent f1d3fba commit 091dacc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/gadget/udc/net2272.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ net2272_dequeue(struct usb_ep *_ep, struct usb_request *_req)
945945
break;
946946
}
947947
if (&req->req != _req) {
948+
ep->stopped = stopped;
948949
spin_unlock_irqrestore(&ep->dev->lock, flags);
949950
return -EINVAL;
950951
}

0 commit comments

Comments
 (0)