OSDN Git Service

usb: dwc2: Fix dwc2_hsotg_core_init_disconnected()
authorVardan Mikayelyan <mvardan@synopsys.com>
Tue, 16 Jan 2018 12:04:24 +0000 (16:04 +0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 12 Feb 2018 08:59:31 +0000 (10:59 +0200)
commit755d739534f998d92e348fba8ffb0478416576e7
tree85c071686cfba05e9398f74688882539b525cbe4
parent9e95a66cce7250c358d496e1c3b62e29ce79ef40
usb: dwc2: Fix dwc2_hsotg_core_init_disconnected()

We should call dwc2_hsotg_enqueue_setup() after properly
setting lx_state. Because it may cause error-out from
dwc2_hsotg_enqueue_setup() due to wrong value in lx_state.

Issue can be reproduced by loading driver while connected
A-Connector (start in A-HOST mode) then disconnect A-Connector
to switch to B-DEVICE.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c