Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASoC: SOF: ignore unrecoverable CTX_SAVE IPC errors at suspend #1004

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Jun 3, 2019

Harden SOF against unexpected DSP errors by ignoring unknown errors of CTX_SAVE at suspend.

Without this, any issue with DSP results in a situation where system reboot is needed. To err on the side of precaution, suspend should proceed by default.

Note: this patch was earlier part of wdog RFC series (PR841), but is now submitted independently for merging as it seems to bring value on its own based on experiences from IPC timeout bughunt in 2019 May.

As part of the suspend flow, a context save IPC message is
sent to the firmware before powering down the DSP. If errors
are met, the suspend flow is aborted with current code.

Change the behaviour such that if firmware returns -EBUSY or
-EAGAIN, return the error codes to PM core as before. The device
is left in active state in this case.

If other errors are reported, print a warning but do not block the
suspend flow. As per interface specification, no valid error can be
returned in this scenario. If the hardware has hit a fatal error and
is not able to respond successfully, best recovery method is to
proceed with suspend and power off the DSP.

Signed-off-by: Kai Vehmanen <[email protected]>
@kv2019i kv2019i force-pushed the topic/ignore-fatal-ctxsave-error-at-suspend branch from 1aff0eb to a2748c6 Compare June 5, 2019 11:34
@lgirdwood
Copy link
Member

@kv2019i some conflicts

Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kv2019i looks good to me.

@plbossart
Copy link
Member

@kv2019i some conflicts

What do you mean @lgirdwood ? I was about to merge but not sure if you've saying to hold off for now?

@plbossart
Copy link
Member

no info from @lgirdwood so merging.

@plbossart plbossart merged commit c760776 into thesofproject:topic/sof-dev Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants