Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 75e91fe9 authored by Manu Gautam's avatar Manu Gautam
Browse files

USB: android: Fix crash when F_FS gets descriptors before it is enabled



If F_FS (or ADB) function is selected in the composition, android
gadget driver keeps USB gadget disabled until it receives function
descriptors from userspace. This is signalled by F_FS when it calls
functionfs_ready_callback.
There could be a scenario (mainly due to userspace ignorance) that
before enabling F_FS (ADB) in the composition, descriptors are already
passed to F_FS. This results in a crash later on cable connection
in ffs_set_alt due to missing contexts initialization as functionfs_bind
never got called.

Fix this by calling functionfs_bind when F_FS is enabled by user and
it already has received the descriptors.

CRs-fixed: 585542
Change-Id: I52d680cdcd7f5d4a3eb90eb64785ea176c832849
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 012fce15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment