Commit 983d305a authored by Thinh Nguyen's avatar Thinh Nguyen Committed by Mayank Rana
Browse files

FROMGIT: usb: dwc3: gadget: Prevent repeat pullup()



Don't do soft-disconnect if it's previously done. Likewise, don't do
soft-connect if the device is currently connected and running. It would
break normal operation.

Currently the caller of pullup() (udc's sysfs soft_connect) only checks
if it had initiated disconnect to prevent repeating soft-disconnect. It
doesn't check for soft-connect. To be safe, let's keep the check here
regardless whether the udc core is fixed.

Signed-off-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/1c1345bd66c97a9d32f77d63aaadd04b7b037143.1650593829.git.Thinh.Nguyen@synopsys.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 69e131d1 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/

 usb-next)

BUG: 238836938
Change-Id: Ibcb208581948132cfe4736381a67fea33026c372
Signed-off-by: default avatarUdipto Goswami <quic_ugoswami@quicinc.com>
Signed-off-by: default avatarMayank Rana <quic_mrana@quicinc.com>
parent 6d4cc0e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment