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

Skip to content
Commit 7cd4d87b authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: Stall OS descriptor request for unsupported functions



Hosts which request "OS descriptors" from gadgets do so during
the enumeration phase and before the configuration is set with
SET_CONFIGURATION. Composite driver supports OS descriptor
handling in composite_setup function. This requires to pass
signature field, vendor code, compatibleID and subCompatibleID
from user space. Currently gadget providing this info from
usb init scripts irrespective of the functions supported
for OS descriptors.

In mass-storage only composition, mass storage function
doesn't have os descriptor at all, but windows 10 host sending
vendor specific request for os descriptors and composite driver
handling this request with invalid data. With this invalid info
host resetting the bus and never selecting the configuration
and leading enumeration issue.

Fix this by bailing out from the OS descriptor setup request
handling if the functions does not have OS descriptors compatibleID.

Change-Id: I4629cee9787201cbb9dbb61c958a3c2f637edb9f
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent 3d91e789
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