usb: gadget: Fix datastall upon USB cable disconnect

Original bug was a datastall in the IPA upon USB
cable disconnect during high throughput traffic.
It was caused due to IPA continuing sending data to USB
without USB being able to consume the data (disconnected cable),
causing a stall in the IPA hardware.

The solution proposed here is to first disconnect the pipes
and only afterwards disconnect the tethering bridge that deletes
the IPA configuration for the connection.

CRs-fixed: 500370
Change-Id: I6d8524053da593775c75ddc1ef95f377e30aaafd
Signed-off-by: Lena Salman <esalman@codeaurora.org>
2 files changed