f_gsi: Don't reconfigure USB GSI eps multiple time with cable connect case

Commit dbca823c25bf ("f_gsi: Don't send end xfer command when USB is
into U3 state") consolidated below usecases path for RNDIS:
1. USB RNDIS adaptor disable/enable case
2. USB RNDIS suspend/resume case
3. USB cable connect case

Due to USB GSI endpoints are getting disabled as part of above usecase
1 i.e. adaptor disable, it is required to reconfigure and re-enable USB
GSI endpoints when adaptor is enabled. USB GSI endpoints are re-configured
but not re-enabled for above usecase 3 although it is already configured
and enabled as pat of set_alt(1). Hence USB GSI endpoint are partially
configured causing no USB data transfer between USB GSI and IPA GSI which
fails IP address assignment. Fix this issue by making sure that USB GSI
endpoints are not reconfigured in above usecase 3.

CRs-Fixed: 1095920
Change-Id: I67068bac21274d715f61f9e5b83fae54e2c8e22d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
Mayank Rana 2016-12-01 09:58:30 -08:00 committed by Hemant Kumar
parent 82e6740d7f
commit 200938e487

View file

@ -672,25 +672,27 @@ static void ipa_work_handler(struct work_struct *w)
break;
}
/*
* Update desc and reconfigure USB GSI OUT and IN
* endpoint for RNDIS Adaptor enable case.
*/
if (d_port->out_ep && !d_port->out_ep->desc &&
gsi->out_ep_desc_backup) {
d_port->out_ep->desc = gsi->out_ep_desc_backup;
d_port->out_ep->ep_intr_num = 1;
log_event_dbg("%s: OUT ep_op_config", __func__);
usb_gsi_ep_op(d_port->out_ep,
&d_port->out_request, GSI_EP_OP_CONFIG);
}
if (d_port->in_ep && !d_port->in_ep->desc &&
gsi->in_ep_desc_backup) {
d_port->in_ep->desc = gsi->in_ep_desc_backup;
d_port->in_ep->ep_intr_num = 2;
}
if (d_port->out_ep)
usb_gsi_ep_op(d_port->out_ep,
&d_port->out_request, GSI_EP_OP_CONFIG);
if (d_port->in_ep)
log_event_dbg("%s: IN ep_op_config", __func__);
usb_gsi_ep_op(d_port->in_ep,
&d_port->in_request, GSI_EP_OP_CONFIG);
}
ipa_connect_channels(d_port);
ipa_data_path_enable(d_port);