usb: dwc2: Disable all EP's on disconnect
authorMinas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Wed, 19 Sep 2018 14:13:52 +0000 (18:13 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:30:52 +0000 (09:30 +0200)
commitec58bfa2d4120ea39ef39c8e54abcde461f94248
treef94adf929894970c2cbd6c9c2122d9dd90353358
parent9e441c7844a6223e20105a9e4316079f7b26f15c
usb: dwc2: Disable all EP's on disconnect

commit dccf1bad4be7eaa096c1f3697bd37883f9a08ecb upstream.

Disabling all EP's allow to reset EP's to initial state.
On disconnect disable all EP's instead of just killing
all requests. Because of some platform didn't catch
disconnect event, same stuff added to
dwc2_hsotg_core_init_disconnected() function when USB
reset detected on the bus.

Changed from version 1:
Changed lock acquire flow in dwc2_hsotg_ep_disable()
function.

Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/gadget.c