mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
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>
This commit is contained in:
parent
1ca91eb817
commit
147ca8205d
1 changed files with 3 additions and 0 deletions
|
|
@ -323,6 +323,9 @@ static ssize_t gadget_dev_desc_UDC_store(struct config_item *item,
|
|||
gi->composite.gadget_driver.udc_name = NULL;
|
||||
goto err;
|
||||
}
|
||||
#ifdef CONFIG_USB_CONFIGFS_UEVENT
|
||||
schedule_work(&gi->work);
|
||||
#endif
|
||||
}
|
||||
mutex_unlock(&gi->lock);
|
||||
return len;
|
||||
|
|
|
|||
Loading…
Reference in a new issue