usb: dwc3: gadget: conditionally remove requests
stable inclusion from stable-v5.10.157 commit a32635528d6552cb729968af2db09e64c4ac6f24 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a32635528d6552cb729968af2db09e64c4ac6f24 -------------------------------- [ Upstream commit b44c0e7f ] 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: NMichael Grzeschik <m.grzeschik@pengutronix.de> Link: https://lore.kernel.org/r/20220720213523.1055897-1-m.grzeschik@pengutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Stable-dep-of: f90f5afd ("usb: dwc3: gadget: Clear ep descriptor last") Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
Showing
想要评论请 注册 或 登录