USB: configfs: Send DISCONNECT uevent during UDC bind
commit ("USB: configfs: Don't send DISCONNECT uevent during unbind")
removed sending disconnect uevent from unbind path. In normal disconnect
path kernel will notify the disconnect event from dwc3_disconnect_gadget()
function. If their is a race between composition switch and cable
disconnect dwc gadget pointers may become null from composition unbind
rules and then we end up not sending any disconnect notification to
usespace and status remains in usb connected state in
usb preferences screen.
Hence fix this issue by scheduling android work from bind path
which will send disconnect event to userspace.
Change-Id: Ic53d8d9f6e5ae19d28bb1c23722a62a38f80ec08
Signed-off-by:
Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Loading
Please register or sign in to comment