]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: gadget: net2280: Fix net2280_dequeue()
authorGuido Kiener <guido@kiener-muenchen.de>
Mon, 18 Mar 2019 08:18:33 +0000 (09:18 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit8cbb47dc5580cfeb22340c220a7cf2c05fb82ee6
tree7ed915ab25038f50dc3f5734b9e9cd6ae3cc20b8
parent5d76302ceb73fc368f8ba0d1541c9bb8e4ea17ac
usb: gadget: net2280: Fix net2280_dequeue()

BugLink: https://bugs.launchpad.net/bugs/1838459
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/gadget/udc/net2280.c