From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796026145; b=AOFhK9Ea9PY/Z2lf+VJm23P43kPMxP6bzS5+wFFpT4DsaJqOgsG8g4q5YeGocf1ch9CT DQog17hFYng12Qw7sd9S935CTdwwafC/mq5IV598fW3qWDvFRZzTEERBuEb26DK/Jc98B hpbU0pQ2Hf1NxA2t1pZ4nQCYmXkMPgH1Cyubc7lotYUN93m1S+nrjnSpGAv/kbXGZlFB1 Zlk2XgM9OSN2IouxZd66H9cLU8Jdj09Y3MhkMC4nRkemxXTD9WzoRJIYrxpoVys7Kwzta NUdMmqWSpS6sI1m5vw5ug0Sc7DSfnJ4J36kx0G5CPaZkIk10Hihe5OBRM4wfkhi2wjQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796026145; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Date:From: To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:X-Proofpoint-ORIG-GUID: X-Authority-Analysis:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-GUID: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=FgC8gp0E4/zzeQdSbGKtaQHE6Da5NVYrtPPJK4HGfJM=; b=BWXnOiPQI6/3FCA1qwzfXj/4nmz0pyKR2zgpR+8M4vY5XroA5EKaeXcf+SaG+oDOw9P0 o05XpZHEiPkbalRhygpq2RuD9LmWiDjcC34LquzSO08QFiPl0TsoN29q2rp4Xh3S7O/U7 DPoh74dLuO1GH77TO2tWJxFwOGZLdyK/Wj2CpKb/4nxvikKC39f7QnnP/g/JYLWrf0efa ZDv6/KdTR9YVK4p9rOSovM5nre8iBPQODBVrEEZeHK38UE2tC4+av5/4oerJRQpumS5mP T89yseV3g2VR/h4aKoULygegyAq5WVj4yS+HXun2kX40cyDuplxdPbJrKvew9cXJZ1g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=K5QWg0xX; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=Wv7EGKiC; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10E0C606A334 for ; Mon, 30 Nov 2026 08:09:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 10E0C606A334 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=K5QWg0xX; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=Wv7EGKiC Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AU5GNKR2449067 for ; Mon, 30 Nov 2026 08:09:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=FgC8gp0E4/zzeQdSbGKtaQHE 6Da5NVYrtPPJK4HGfJM=; b=K5QWg0xXpvXyzezGIjA0ZVC0G+aumqLUZmeEXdTM KmjxMN0+TFfBHdMJqZKfGpSXPGMCbcTjuc6yQdPSyqwkv3RVng49WxHFaGm0RRaz RD1M68Vp2/a3lNO6zHGgwtyKeHqE43sc/bknCzBnsiv36pipoejlk4IEGXl4QTrh 339IzfBzyAJLlUUif1Dwwe4Jcv/ZHWWWQcJx8VkLaQKszoH9DvNU3g5SA/XkGa4f RaYu42W4sRBGZDE3mK7LBBr8IuF9awqpKBKGeZdpKBkj4G8Thtd0NGO8ywtUTpRO n37KV9TaK+UpjlYNTxHV8akeu2kGVDD8WqoNlzslTclAwQ== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j92qpgkq0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 08:09:03 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2f022026e60so109168535ad.0 for ; Mon, 30 Nov 2026 00:09:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796026143; x=1796630943; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=FgC8gp0E4/zzeQdSbGKtaQHE6Da5NVYrtPPJK4HGfJM=; b=Wv7EGKiCcd2jrAIrSTK4QzZHvUDM8Yh/JnBDpxTdJKehDZwmGTo8g0BD0MKrt7LLy3 1fuMLyo7ZqgvncsS/OB/FB1l8gVVcb9YZV1ctDbBuku7dHmxGrSrIukjWwChxdlhh536 JdbPpBdZXI0wKKCn78DCBF0r8BQofILyP9sS9EWAbpDcTjUWp5EDZbHPZ6t1SBthoQ0N bfJz22Ofj6K1umls3EdMUAimnTMUrl8xFh7WplU1S6oP4umiJD9BQiXgnmU41S4FQQiF gocZxDsN1IxbWofhPN9a6f8d2Q5jjBMIJdtnz1bkaRwWLMlKvFCJSL4dMJcD4B2OfIYR 0mDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796026143; x=1796630943; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FgC8gp0E4/zzeQdSbGKtaQHE6Da5NVYrtPPJK4HGfJM=; b=VRJyPISpbt6YRiXIKftobUbrwfaibDSuvXDDUdqFobWZ46jIqwMkiXnptdrX9ozR5Z eO+Q1tSQf9orZ+Q9mPdl9Xv6V6ZdX57Uoo/z0hNu1cP0ClDUza0HWRiC4OXZabAxoO0O ThmZOw1jerD6fcleon+is9yHWAoeqnlCNLcJohxlTeo3kr8RKZyy0EN3iXfcTZlR/aBk 2eVaRq485A3PBufb0nEmZJ4nLDoEU0CBuchKpizNfN54DmgfswOlXee2cc5vUhCN459f CVJ5zSWQQ9abAQs4nPuqlq0vNf+M/uJ9jrWw0nUjyahRWERucnpWDcK2UjOGGNLhcxJ9 DVGg== X-Forwarded-Encrypted: i=1; AL+hErEnBV2HET0+VO50ERxUJiY8i1k0C8IjI6Ftxub5PyTnHCYfJmwSL+DneTyKr4saJOz/PxzSeUEe00b8KqQ=@vger.kernel.org X-Gm-Message-State: APuU4Z/5XTWGodWjBLVwEVVWhzXJ6cxmsAc/INsqWsI6/d6W1lRsAzJG QB7GSqthnRysaUm0oZyFwILFdUE8magkb8/iGEvb3u8hwYV90fPa2Yw0Z3PrsjTJqow/YuoGCPl lfkKxPqGjNfCHbhpT109Lx/FOzM3SgqyWMjtJLJ2qDXHkBlSSulcNg+qX9PylEb/Cg/8= X-Gm-Gg: AZFdTZeGUTj5iMj8Nwk5QWIZBISH8hFZvEpwPRoyRscbBFMFnaAZNcZKYfkKJvMt3Vt 8Z1+AdkE+OcjLdXHvcJFjq2yjxozaygMNv2eUe3S1hpwCb14J8JivVFPlkrNF0TZTfKPCMBroU2 9CF2Olul9UM7JKlEWJF+SCm4RxGWql67kE++zbv96GLU9BtiNInEb/YfiW4rLt86HEX9fbZtJpC VTSs6U2yEWKSfGu0jKRRwkoRimBNE5HHyY1cdAXh3qGYwJ139PtLdVylCrlQS80ML7GtS0E7AJs QVPzxcU/xyBwCQu67KzOraN5HBocDb//6x3yUXIOC4Se6iqSd8G55GmJr/8aVQFC6NlHTYOzP/1 w0/7j5OnYGWuX8ZV8imF5cln/8KzYVp4xkxPXcxrK75ONWco4Wf8LXBrcpIY0FuZNj7dMfWd4Yg 9N+p3Pl1MEEVKldpkL X-Received: by 2002:a17:903:1aeb:b0:2f0:a586:81da with SMTP id d9443c01a7336-2f0a5868268mr172896815ad.0.1796026142741; Mon, 30 Nov 2026 00:09:02 -0800 (PST) X-Received: by 2002:a17:903:1aeb:b0:2f0:a586:81da with SMTP id d9443c01a7336-2f0a5868268mr172896535ad.0.1796026142258; Mon, 30 Nov 2026 00:09:02 -0800 (PST) Received: from QCOM-aGQu4IUr3Y (i-global052.qualcomm.com. [199.106.103.52]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f07877d6afsm132657865ad.42.2026.11.30.00.08.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 00:09:01 -0800 (PST) Date: Mon, 30 Nov 2026 16:08:55 +0800 From: Shawn Guo To: Srinivas Kandagatla , Mohit Sharma Cc: Srinivas Kandagatla , Bjorn Andersson , Mark Brown , Ajay Kumar Nandam , Liam Girdwood , Konrad Dybcio , Jaroslav Kysela , Takashi Iwai , Krzysztof Kozlowski , linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 2/2] soc: qcom: apr: Publish GPR callback before client probe Message-ID: References: <20261022144130.2443667-1-mohit.sharma@oss.qualcomm.com> <20261022144130.2443667-3-mohit.sharma@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Proofpoint-ORIG-GUID: zTh0jntt6DjcxmYFrCg0rVC7oWy11wic X-Authority-Analysis: v=2.4 cv=YMQKWhGx c=1 sm=1 tr=0 ts=6b0d2f1f cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=b9+bayejhc3NMeqCNyeLQQ==:17 a=kj9zAlcOel0A:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=8G2HQ0P9srmf_d4daVkA:9 a=CjuIK1q_8ugA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDAzMiBTYWx0ZWRfX782ER7v8B+Zh 72jAb5QmmjolsvmBIeFAtf1A3dLeqgWKbNhp19stv65dozzXrpe0rRM4AnUH3zJk5wNcaTdNNm8 DMlp1G2vT344xMasuFBuBCGIQQcpBTw= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDAzMiBTYWx0ZWRfX3nboqKPEURgz sk3rCRSxcVS+EcRtMOnrmyfuR7jozrus0sYI8vV3PfwSHH5lyb5Mt8D7erJnOObJwhMQxcQT5lr hjZ3YwMiE8VtqszMPawPiIMiruY3QJM/UwHb/udjLY1sadAl1iMIfMawasakhBTGXOPfsPOTrPa 0BTajbdqrr99dj5rTzCZLRhenRyODOc6q4PTxTFMchEpJrQdA7nCM18PR577B23Z8ZaaxO5K5Xe KwWYaByAGwc9M4AHYQ1zqIfTfJdkOLOuo9Q+9/WtJ/SKMwFr3fsqRso/wN9MIbSN+q60Y5845MS FDe841lSUm70ixoPSMttB4yR4s1NvQ/O70tjAef9hVOQRV98lG9DPfIwFDyBvDcfiWY8PeJt71S CwoKOlWzGRPpBXi4zrKbV9kpioj9gw5o7a6d/szNu0EhZWwRyRpn4wiHlHmtekvA+F9xk3skYVB KEQ7frCO4N+39Czi7zg== X-Proofpoint-GUID: zTh0jntt6DjcxmYFrCg0rVC7oWy11wic X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-30_02,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300032 On Sun, Nov 15, 2026 at 10:00:40AM +0000, Srinivas Kandagatla wrote: > On 10/22/26 3:41 PM, Mohit Sharma wrote: > > A GPR service driver can issue synchronous commands from its probe path, > > or populate child devices which issue commands before the parent probe > > returns. The APR/GPR bus currently installs the GPR service callback only > > after the service driver's probe has completed. > > > > If a response arrives while the client probe is still running, GPR finds > > the destination service but cannot dispatch the response because the > > service callback is NULL. The client waiting for the response eventually > > times out. > > > > This was observed intermittently on Qualcomm Lemans and Monaco platforms > > when q6apm child probing sent an APM shared-memory map command before the > > parent probe returned. The failure has the following signature: > > > > qcom-apm ... CMD timeout for [100100c] opcode > > q6apm-dai ... Audio Start: Buffer Allocation failed rc = -110 > > snd-sc8280xp ... ASoC: can't create pcm MultiMedia1 Playback :-110 > > > > Install the GPR callback before invoking the client probe so responses to > > probe-time commands can be dispatched. Clear the callback again if probe > > fails, and preserve the existing callback ordering for APR clients. > > > > Fixes: ec1471a898cc ("soc: qcom: apr: Add GPR support") > > Cc: stable@vger.kernel.org > > Co-developed-by: Ajay Kumar Nandam > > Signed-off-by: Ajay Kumar Nandam > > Signed-off-by: Mohit Sharma > > --- > > drivers/soc/qcom/apr.c | 15 +++++++++++++-- > > 1 file changed, 13 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/soc/qcom/apr.c b/drivers/soc/qcom/apr.c > > index ea7f83916d8d..829e5c8fdf98 100644 > > --- a/drivers/soc/qcom/apr.c > > +++ b/drivers/soc/qcom/apr.c > > @@ -365,13 +365,24 @@ static int apr_device_probe(struct device *dev) > > { > > struct apr_device *adev = to_apr_device(dev); > > struct apr_driver *adrv = to_apr_driver(dev->driver); > > + struct packet_router *apr = dev_get_drvdata(dev->parent); > > int ret; > > > > + if (apr->type == PR_TYPE_GPR) > > + adev->svc.callback = adrv->gpr_callback; > Why do we need this check? > > + > > ret = adrv->probe(adev); > > - if (!ret) > > + if (ret) { > > + if (apr->type == PR_TYPE_GPR) > > + adev->svc.callback = NULL; > same Hi Mohit, Do you plan to address review comment soon? Otherwise, I will just send my version of the similar change. Shawn