usb: gadget: mtp: reset string descriptor's index with unbind
When USB host is re-enumerating USB MTP device multiple time, it
has been observed that USB MTP enumeration fails. USB MTP host
side environment (i.e. libmtp) is looking for USB MTP device to
pass string descriptor as "MTP" for successful enumeration. Due
to iInterface ID conflict, USB device is passing next interface
related string descriptor instead of USB MTP interface related
string descriptor. This results into no enumeration with USB MTP
configuration. Fix this issue by resetting mtp_string_defs string
descriptor id to zero, so next mtp_function_bind() call re-allocates
string ID.
CRs-Fixed: 2024744
Change-Id: Iad290ad480ccf23bd514a67128541d7ff67de1a5
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment