USB: gsi: Ring Doorbell to GSI if check for suspend fails

Currently GSI driver is clearing Doorbell to GSI in gsi_suspend(),
when it receives function suspend and notifying suspend to GSI in work
queue context. In ipa_suspend_work_handler(), driver is first checking
whether GSI wrapper is ready to suspend before doing xdci_suspend(). This
check fails if function resume received before ipa_suspend_work_handler()
gets chance to run. Due to this, state machine still stays at CONNECTED
state. When function resume is received, state machine is not handling
resume event and results in not ringing Doorbell to GSI. This eventually
causes data stall. Hence fix the issue by ringing Doorbell to GSI if in
case check for suspend fails in ipa_suspend_work_handler.

Change-Id: Ifbc03b7edde6e1be23c326118e89f805b148f9ff
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
This commit is contained in:
Vijayavardhan Vennapusa 2017-11-15 10:52:11 +05:30 committed by Gerrit - the friendly Code Review server
parent ae2f6cb5ad
commit 86747debd9

View file

@ -554,6 +554,9 @@ static int ipa_suspend_work_handler(struct gsi_data_port *d_port)
if (!usb_gsi_ep_op(gsi->d_port.in_ep, (void *) &f_suspend,
GSI_EP_OP_CHECK_FOR_SUSPEND)) {
ret = -EFAULT;
block_db = false;
usb_gsi_ep_op(d_port->in_ep, (void *)&block_db,
GSI_EP_OP_SET_CLR_BLOCK_DBL);
goto done;
}