diff options
| author | Mayank Rana <mrana@codeaurora.org> | 2016-09-15 11:22:28 -0700 |
|---|---|---|
| committer | Mayank Rana <mrana@codeaurora.org> | 2016-09-15 17:54:44 -0700 |
| commit | 427369cd5f250b806dd0ea05d3099d79bdb3c976 (patch) | |
| tree | 1655bb06e4250a54f456c6ca09ced86a57428d3a /drivers/usb | |
| parent | 9b82a4c5896632b62140d1ddda55638fea254007 (diff) | |
Revert "usb: gsi: Queue control notification on gsi_resume"
This reverts commit <fae741edccb> ("usb: gsi: Queue control
notification on gsi_resume") as expected notification is not
queued resulting into mismatch of QMI transaction packet.
CRs-Fixed: 1067006
Change-Id: I4abdd79699d47054e268978aae9199f1d5d1ddcb
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/gadget/function/f_gsi.c | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c index 80c9928e948e..5ab0b0ae6dc8 100644 --- a/drivers/usb/gadget/function/f_gsi.c +++ b/drivers/usb/gadget/function/f_gsi.c @@ -1380,12 +1380,6 @@ static int gsi_ctrl_send_notification(struct f_gsi *gsi, return -ENODEV; } - if (atomic_inc_return(&gsi->c_port.notify_count) != 1) { - log_event_dbg("delay ep_queue: notify req is busy %d", - atomic_read(&gsi->c_port.notify_count)); - return 0; - } - event = req->buf; switch (state) { @@ -1441,6 +1435,12 @@ static int gsi_ctrl_send_notification(struct f_gsi *gsi, log_event_dbg("send Notify type %02x", event->bNotificationType); + if (atomic_inc_return(&gsi->c_port.notify_count) != 1) { + log_event_dbg("delay ep_queue: notify req is busy %d", + atomic_read(&gsi->c_port.notify_count)); + return 0; + } + return queue_notification_request(gsi); } @@ -1490,8 +1490,7 @@ static void gsi_rndis_response_available(void *_rndis) { struct f_gsi *gsi = _rndis; - gsi_ctrl_send_notification(gsi, - GSI_CTRL_NOTIFY_RESPONSE_AVAILABLE); + gsi_ctrl_send_notification(gsi, GSI_CTRL_NOTIFY_RESPONSE_AVAILABLE); } static void gsi_rndis_command_complete(struct usb_ep *ep, @@ -2078,8 +2077,6 @@ static void gsi_suspend(struct usb_function *f) queue_work(gsi->d_port.ipa_usb_wq, &gsi->d_port.usb_ipa_w); } - log_event_dbg("%s: notify_count = %d\n", - __func__, atomic_read(&gsi->c_port.notify_count)); log_event_dbg("gsi suspended"); } @@ -2104,21 +2101,6 @@ static void gsi_resume(struct usb_function *f) else remote_wakeup_allowed = f->config->cdev->gadget->remote_wakeup; - if (gsi->c_port.notify && !gsi->c_port.notify->desc) - config_ep_by_speed(cdev->gadget, f, gsi->c_port.notify); - - log_event_dbg("%s: notify_count = %d\n", - __func__, atomic_read(&gsi->c_port.notify_count)); - - /* Send notification to host for RMNET, RNDIS and MBIM Interface */ - if ((gsi->prot_id == IPA_USB_MBIM || - gsi->prot_id == IPA_USB_RNDIS || - gsi->prot_id == IPA_USB_RMNET) && - (atomic_read(&gsi->c_port.notify_count) >= 1)) { - log_event_dbg("%s: force_queue\n", __func__); - queue_notification_request(gsi); - } - if (!remote_wakeup_allowed) { /* Configure EPs for GSI */ @@ -2149,6 +2131,11 @@ static void gsi_resume(struct usb_function *f) post_event(&gsi->d_port, EVT_RESUMED); queue_work(gsi->d_port.ipa_usb_wq, &gsi->d_port.usb_ipa_w); + + if (gsi->c_port.notify && !gsi->c_port.notify->desc) + config_ep_by_speed(cdev->gadget, f, gsi->c_port.notify); + + atomic_set(&gsi->c_port.notify_count, 0); log_event_dbg("%s: completed", __func__); } |
