Merge "usb: gadget: Reset string ids upon unbind"

This commit is contained in:
qctecmdr 2020-04-03 15:20:02 -07:00 • committed by Gerrit - the friendly Code Review server
commit 5ff8a4813a
2 changed files with 10 additions and 0 deletions

View file

@ -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);
}

View file

@ -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);