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:
Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Loading
Please register or sign in to comment