usb: gadget: u_bam: Delay suspend sequence until connect sequence finished

Suspend sequence can also start as a result of cable disconnection.
When connecting and disconnecting the cable fast enough, it can
result in a race condition between the connect and the suspend sequences.
As a result of that, both suspend and connect would not finish, which
will leave IPA resource manager in invalid state.
This fix guarantee that the suspend sequence will only start after
calling teth_bridge_connect, which means connect sequence can finish
successfully.

CRs-Fixed: 511697
Change-Id: Ie2303d1080d40e9fa23db489482004933f3f21e2
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
2 files changed