[PATCH 0/2] Fix GPR callback registration race during probe

From: Mohit Sharma

Date: Thu Oct 22 2026 - 11:04:53 EST


GPR service drivers can issue synchronous commands directly from their
probe callbacks or indirectly while populating child devices. The GPR
bus currently publishes the service callback only after the client probe
returns. Consequently, a DSP response received during probe cannot be
dispatched and the command times out.

This was observed intermittently on Qualcomm Lemans and Monaco platforms
while q6apm child probing issued an APM shared-memory map command. The DSP
response reached the GPR receive path, but was discarded because the
service callback had not yet been installed.

The first patch prepares q6apm and q6prm for early callback publication by
ensuring callback-visible state is initialized before driver data is
published and safely ignoring packets received before that point. The
second patch publishes GPR callbacks before invoking client probes and
clears them again when probing fails. Existing APR callback ordering is
left unchanged.

Mohit Sharma (2):
ASoC: qcom: q6apm: Guard callbacks until probe data is ready
soc: qcom: apr: Publish GPR callback before client probe

drivers/soc/qcom/apr.c | 15 +++++++++++++--
sound/soc/qcom/qdsp6/q6apm.c | 6 ++++--
sound/soc/qcom/qdsp6/q6prm.c | 3 +++
3 files changed, 20 insertions(+), 4 deletions(-)

--
2.34.1