Skip to content

Commit 35fe974

Browse files
Alex Eldergregkh
authored andcommitted
net: ipa: skip suspend/resume activities if not set up
[ Upstream commit d170438 ] When processing a system suspend request we suspend modem endpoints if they are enabled, and call ipa_cmd_tag_process() (which issues IPA commands) to ensure the IPA pipeline is cleared. It is an error to attempt to issue an IPA command before setup is complete, so this is clearly a bug. But we also shouldn't suspend or resume any endpoints that have not been set up. Have ipa_endpoint_suspend() and ipa_endpoint_resume() immediately return if setup hasn't completed, to avoid any attempt to configure endpoints or issue IPA commands in that case. Fixes: 84f9bd1 ("soc: qcom: ipa: IPA endpoints") Tested-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c2c599a commit 35fe974

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ipa/ipa_endpoint.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,9 @@ void ipa_endpoint_resume_one(struct ipa_endpoint *endpoint)
14711471

14721472
void ipa_endpoint_suspend(struct ipa *ipa)
14731473
{
1474+
if (!ipa->setup_complete)
1475+
return;
1476+
14741477
if (ipa->modem_netdev)
14751478
ipa_modem_suspend(ipa->modem_netdev);
14761479

@@ -1482,6 +1485,9 @@ void ipa_endpoint_suspend(struct ipa *ipa)
14821485

14831486
void ipa_endpoint_resume(struct ipa *ipa)
14841487
{
1488+
if (!ipa->setup_complete)
1489+
return;
1490+
14851491
ipa_endpoint_resume_one(ipa->name_map[IPA_ENDPOINT_AP_COMMAND_TX]);
14861492
ipa_endpoint_resume_one(ipa->name_map[IPA_ENDPOINT_AP_LAN_RX]);
14871493

0 commit comments

Comments
 (0)