Преглед изворни кода

ipa: Fix MHI channel resume after stuck GSI

If in the __ipa3_stop_gsi_channel all iterafions
of the gsi_stop_channel returned GSI_STATUS_AGAIN,
channel->stop_in_proc flag has to be set,
otherwise the teardown of the ipa_mhi_suspend_internal
won't resume this channel.

For that the return value of the gsi_stop_channel
has to be forwarded (in case no other errors exist).

Additionally ipa_mhi_resume_channels should check both
IPA_HW_MHI_CHANNEL_STATE_SUSPEND state
and stop_in_proc flag.

Change-Id: I369211456fa949f8c1869b577028ff44ed4e2c95
Signed-off-by: Ilia Lin <[email protected]>
Ilia Lin пре 4 година
родитељ
комит
63f19cf561

+ 2 - 2
drivers/platform/msm/ipa/ipa_clients/ipa_mhi_client.c

@@ -1496,8 +1496,8 @@ static int ipa_mhi_resume_channels(bool LPTransitionRejected,
 	for (i = 0; i < max_channels; i++) {
 		if (!channels[i].valid)
 			continue;
-		if (channels[i].state !=
-		    IPA_HW_MHI_CHANNEL_STATE_SUSPEND)
+		if (channels[i].state != IPA_HW_MHI_CHANNEL_STATE_SUSPEND &&
+		    !channels[i].stop_in_proc)
 			continue;
 		channel = &channels[i];
 		IPA_MHI_DBG("resuming channel %d\n", channel->id);

+ 1 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

@@ -8415,7 +8415,7 @@ static int __ipa3_stop_gsi_channel(u32 clnt_hdl)
 	}
 
 	IPAERR("Failed  to stop GSI channel with retries\n");
-	return -EFAULT;
+	return res;
 }
 
 /**