mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
usb: gadget: net2280: Fix net2280_dequeue()
[ Upstream commit f1d3fba17c
]
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>
This commit is contained in:
parent
c276c78434
commit
12d9d2e9ce
1 changed files with 2 additions and 2 deletions
|
@ -1277,9 +1277,9 @@ static int net2280_dequeue(struct usb_ep *_ep, struct usb_request *_req)
|
|||
break;
|
||||
}
|
||||
if (&req->req != _req) {
|
||||
ep->stopped = stopped;
|
||||
spin_unlock_irqrestore(&ep->dev->lock, flags);
|
||||
dev_err(&ep->dev->pdev->dev, "%s: Request mismatch\n",
|
||||
__func__);
|
||||
ep_dbg(ep->dev, "%s: Request mismatch\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue