mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
usb: gadget: Reset string ids upon unbind
String ids for qdss,cdev and gsi based interfaces are re-used even though the device re-enumerates. This is causing string id sequence mismatch and resulting in adb using the string id of qdss interface. Reset the string ids for these functions in their respective unbind calls to fix this issue. Change-Id: Ia9b196734a99ccc2e8c35073ec4e535755774c16 Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
This commit is contained in:
parent
1264c046de
commit
2a4a30b6a6
2 changed files with 10 additions and 0 deletions
|
|
@ -867,6 +867,9 @@ static void usb_cser_unbind(struct usb_configuration *c, struct usb_function *f)
|
|||
{
|
||||
struct f_cdev *port = func_to_port(f);
|
||||
|
||||
/* Reset string id */
|
||||
cser_string_defs[0].id = 0;
|
||||
|
||||
usb_free_all_descriptors(f);
|
||||
usb_cser_free_req(port->port_usb.notify, port->port_usb.notify_req);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3094,6 +3094,13 @@ static void gsi_unbind(struct usb_configuration *c, struct usb_function *f)
|
|||
|
||||
ipa_usb_deinit_teth_prot(gsi->prot_id);
|
||||
|
||||
/* Reset string ids */
|
||||
rndis_gsi_string_defs[0].id = 0;
|
||||
ecm_gsi_string_defs[0].id = 0;
|
||||
rmnet_gsi_string_defs[0].id = 0;
|
||||
mbim_gsi_string_defs[0].id = 0;
|
||||
qdss_gsi_string_defs[0].id = 0;
|
||||
|
||||
if (gsi->prot_id == IPA_USB_RNDIS) {
|
||||
gsi->d_port.sm_state = STATE_UNINITIALIZED;
|
||||
rndis_deregister(gsi->params);
|
||||
|
|
|
|||
Loading…
Reference in a new issue