]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: conditionally remove requests
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Wed, 20 Jul 2022 21:35:23 +0000 (23:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Aug 2022 09:03:44 +0000 (11:03 +0200)
commit83893d953f17ee224be94bb900a406299d2f63ba
treee91bd753962e9fd44149f3686c1c45fb2637ecee
parent1c8bd0f36b2c26fc9f8a922f041adfb38b150335
usb: dwc3: gadget: conditionally remove requests

The functions stop_active_transfers and ep_disable are both calling
remove_requests. This functions in both cases will giveback the requests
with status ESHUTDOWN, which also represents an physical disconnection.
For ep_disable this is not true. This patch adds the status parameter to
remove_requests and sets the status to ECONNRESET on ep_disable.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220720213523.1055897-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c