usb: gadget: net2280: Fix net2280_dequeue()
authorGuido Kiener <guido@kiener-muenchen.de>
Mon, 18 Mar 2019 08:18:33 +0000 (09:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2019 07:20:14 +0000 (09:20 +0200)
commitedaebfe7721cecbb078c5fe39305bced73e9814f
tree8b8df124ea397d7760e3bb48b76844340b2b0ecb
parent346eab0d15598465ec76af1dda76d82487566006
usb: gadget: net2280: Fix net2280_dequeue()

[ Upstream commit f1d3fba17cd4eeea20397f1324b7b9c69a6a935c ]

When a request must be dequeued with net2280_dequeue() e.g. due
to a device clear action and the same request is finished by the
function scan_dma_completions() then the function net2280_dequeue()
does not find the request in the following search loop and
returns the error -EINVAL without restoring the status ep->stopped.
Thus the endpoint keeps blocked and does not receive any data
anymore.
This fix restores the status and does not issue an error message.

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>
drivers/usb/gadget/udc/net2280.c