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=1796045589; b=wFQ6qeh47hwboVKBUpNxTfxjp1wam+HliosaXTmtyOhNgdVZoDNSfsZb1JGaqUuEH1Nl 4R9j192cr741sSxp/K/BTwx6w45tgoB/7J+3rLpRi23SlLGBbZOesI8gwjs7a9zfK5TBp ZZxYo2nFJU97RD7VIyagp16Yo0EBHsy3h9vdxMK4PLHjiGEleuP/SPhE4ymtOERM1FCOh /4F4QUVD8i/CShUnXfIIF8vwlHUwAD3+39MmHrhPRR5C0NxEVsflH17RPpq2Qkc7j/ZiZ gXTcxLQVUu04+b6Grp6br+5nPimu/U97I+/EZ0mvfxQDnNMqujKaWY+MNy9yR6O0v3A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796045589; 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:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Proofpoint-GUID:X-Proofpoint-Spam-Info: X-Authority-Analysis:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-ORIG-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=SzpsaR+iTFrd/Knw/ypLfBrhJrra3uMWUTmlvspqkJw=; b=1g9j6M+99SUFH48JNgE8Z2Xh45LLN4cILuheITgvMxRkwBAqGc3HnLyqyJSYIBnhenn5 LvSH7FtbQB7IZT9zwhJjIymnC+YHonzYhxHJ0VUHy6/ohX1MYHyGAAfr3B9MplOKdmpbW yU1NPo9DOv91RYuIkqckzb3apdG9uGfukrhqPj82m58q83rulker/1i89npzsDuhqF0ds oo/gxfQ1PuDyUsN1+x0Nz4RxS1a1sAmd9+pjJfdyTLZiWoJtaPkZ187Uk1AY9GEI8LzjY 9R/gv5nZj42rXQfz2X4Jy7EdJnURqCL5hbbiZ8ps5qsQGN3JqKW+XHvrjjH9IxAXf7w== 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=dM8Dy9kE; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=W6KffTNB; 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 82B59606A32A for ; Mon, 30 Nov 2026 13:33:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 82B59606A32A 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=dM8Dy9kE; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=W6KffTNB Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AUD8DC92857725 for ; Mon, 30 Nov 2026 13:33:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= SzpsaR+iTFrd/Knw/ypLfBrhJrra3uMWUTmlvspqkJw=; b=dM8Dy9kEBYc7Md14 K5qq20bAVs7mzmqOaKeKjoEQ2+aNCuCfEajbC6lzNvcU3zktuJSdLr3ODcwRymyg 9SDQzyvz7/w7296vtkQC6FSj8OYEMAjTKDyeSvyC2vnaS0S7R227U+pJI4u8iv8u sh66mv+duNkGzn9FPnKjWR5BJhBxzyJ7KYnLrILfJSF1PJoz9P41idy/2L3CeFvQ jPAWjWQ3S0HcDEXvxnEl99xt9EgXdoyaB1+FkTm5vXvdrpG4UkCZQ583T6eszSDu IC6Zgqt1MacvOZtCX9Jbb/4OAmNnRHdou/EemOJ+I6LWYKAEIOFsLQRZsI+kpxYa RkX5KA== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j96c0s00x-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 13:33:07 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2f03aa5ff3bso134460995ad.1 for ; Mon, 30 Nov 2026 05:33:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796045586; x=1796650386; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SzpsaR+iTFrd/Knw/ypLfBrhJrra3uMWUTmlvspqkJw=; b=W6KffTNBdukyAyU+pFyDSLkdALc3yn6SZOdjcn2wGsywuqIUJZlI/AiMghh8LtKFd1 TUU8JxlAtXOOfIsQn2MwbIaQ4wzq3Q0NiTiN1fqwa7EetPGd3b7aEL5ywBikUKpLqfNO dFkwghMKatK0cbd8R1gENZNWaN6SsDC+WZcwZ3busYuFiWPaTMoMbCLoVWjfV1hjmwLG d7FwxPh1rffnGjo9kx327IkcBQs++VTX1UIr6oJU7gAiegAk1W6Zlmm61w922Pey6+ZI qUlhHYq7cmfARxzwdKLNtWeRDeOAWYdKco7QKxsYzsCWxOJ8Xii6zYbQEZYLBs/ryzai fIGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796045586; x=1796650386; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SzpsaR+iTFrd/Knw/ypLfBrhJrra3uMWUTmlvspqkJw=; b=01yZpZCvO0EdMBcHWgsEaWgnUOzlWvaoEhjhvCfOjoRdvCSrHBVGl8hN3B9wTHwvY9 +iTw6bmcriBi1kz5kL+RVgdeKhZzXl5L7JzQXqwI7UYmrT6yVMLsbl+SoiTYp4EWvoTe I7+LBbE7lW+YMvFktYleG85mTGbaO1P0CWca6+HZD1C0flTw3nCOL6903zUyInbl2f2b HyLOaX1KIv88b3pTFIb/DdWt41BgfL86FzXN1hK5hrwI9NaaIq3hqInWiGt5S7UMQ8f3 +sqDQvhIK9P6RFy90xwC6oWjF7M4nBVaA9RHG6pQBOttG/+SMtiRn8bKjCOzjc4l3Bvc UB5A== X-Forwarded-Encrypted: i=1; AL+hErFNMErcXsn0sKodi9VFFEuSv9AXqJZijZPbDaUK1uysXNG2vyZRbaUHhG17UFvc+/G5uA+OsZx97TUEo2E=@vger.kernel.org X-Gm-Message-State: APuU4Z97lfJZ6o8oAwXnvpr7cJMgI3btKZg3OLIOIHg7mxEPnQlu/sbS qcbOdTe3fRj/uY4TqLKyXdUm8EcJ9TN0vU0frEbH++vx8bZ1g/foDqLAbS/HjoHyMZCOO6m1q1z tREIm2qclMTUMfKSYhGE9JcuovALTtQVFZBpOGfLyysOlYNKRuUwZMOIrppKvm0JzeHo= X-Gm-Gg: AZFdTZem4B/EmCZKfFhHVZji6ws4H0FJaSpmPbtlI0BcCvK3sKYpXRd56q6FLab7MCQ 6Mm+CKi4yJaOCHG4s2TB3Uy1NOr14/87hlJL+GIMRN9/vTNajQDe36QeuXG0WEdvcV7Q0mEzNbb 4/XUFNO78Kuz2Oat4Cnqb1eWC7TbUEhL+tlFnetJHA+J4Ocx0WyW2T2IKp//eb9Y+Ixt1tbAjZ/ MADT2t6bTHp1D9qNUowvbeq9CKliV9zNboWyGU9KDlDWdxM0SuIuSQ3UTG58H6bA22sU1wKQJ/Y HZbmiepd1IXkJU6wTtE71c+vHXOFte5Ogmlq8R2pastfJX4MHf3XpluzSf+xGfZ/gyM9j7KNyLq +M25rkeuF5pETsS9WUE0yKlr6WTtrWe+dZlXjyLu8r4C7CkJHg4Cwu60oXvAHUqum8gvPK3C3Gy Ln X-Received: by 2002:a17:902:f603:b0:2e9:4f7b:affd with SMTP id d9443c01a7336-2f03efb00ddmr377955055ad.6.1796045585699; Mon, 30 Nov 2026 05:33:05 -0800 (PST) X-Received: by 2002:a17:902:f603:b0:2e9:4f7b:affd with SMTP id d9443c01a7336-2f03efb00ddmr377954445ad.6.1796045585067; Mon, 30 Nov 2026 05:33:05 -0800 (PST) Received: from [10.218.21.218] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f138ca45a6sm28781885ad.30.2026.11.30.05.33.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 05:33:04 -0800 (PST) Message-ID: Date: Mon, 30 Nov 2026 19:02:59 +0530 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] soundwire: bus: detect SDCA cascade on peripherals reporting class_id 0 To: Pierre-Louis Bossart , Vinod Koul , Bard Liao Cc: linux-sound@vger.kernel.org, ckeepax@opensource.cirrus.com, linux-kernel@vger.kernel.org References: <20261128-sdw-sdca-cascade-v1-1-a97540779103@oss.qualcomm.com> <614f25fb-ad21-4c2b-80e1-7c5f83b4ebbb@oss.qualcomm.com> <9c26a64e-6176-4fc5-ae21-c3f3a519adba@linux.dev> Content-Language: en-US From: Gopi Chandra Sekhar Reddy Kanala In-Reply-To: <9c26a64e-6176-4fc5-ae21-c3f3a519adba@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: HeuVrOM3DlmVxTEspGF9bqDE9-nENqfe X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA1MyBTYWx0ZWRfXwlpYrcUtAtxe mGbWWc9CSE0CKynyeBwKkQT0XI31Pxu54skrIm86wwdNUyIgdQLeIIcL+Y+T0SHhotLw6wDCtgc XEdP1+QanrsQnXNpQ16ic8ULBoHt+8I= X-Authority-Analysis: v=2.4 cv=OvnaWC/t c=1 sm=1 tr=0 ts=6b0d7b13 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=n97cryVZpmK_olmfbOwA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA1MyBTYWx0ZWRfX/IPJrAUc7rMs RjckMW8/OK0x5woMFOWBRNeSAgQmXAFLE7FLRME0qNGqpQPDSTWgvWxbUPB3eViwyTuMvxyJw2C JldGwpeS2K0alWrHGCNt1FJL47zmL/XyGV+n4TNEDqqPKSmqzfGDDEvHcEuiIimR19H5YLeUCvr HTVHe6GqkTafUJCgzc4lIAz+UtJmBTWHimSsIlv5YV1S05KG8PRzwbbPjG/BDOhC01HWIluXlDQ 11SoNu9vT1VTlKZzdtMmJlDCXoLRtTKWi1dyxc80xtff5owIkl+VAOaqUWBR9G+cb5xJeQc4BSF 6A21ALGvr2b3673rV0qkVDZWVpsOebEa6faQpi1Ng2aSQ8YFrRPfZMGDG6j8fD/2SMrHwd7kiOY gJY4AKMLHXSHnvAMoAMsRfZ6Q2fRAx9SLDeaObJuYAg6gjKrwZGmsSE3xJfYH5XFF1npCTHhp+m ZetLZZjEcyMcYMVgdXA== X-Proofpoint-ORIG-GUID: HeuVrOM3DlmVxTEspGF9bqDE9-nENqfe 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_04,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 spamscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300053 On 29-11-2026 18:30, Pierre-Louis Bossart wrote: > On 11/29/26 09:57, Gopi Chandra Sekhar Reddy Kanala wrote: >> >> >> On 29-11-2026 00:41, Pierre-Louis Bossart wrote: >>> On 11/28/26 09:03, Gopi Chandra Sekhar Reddy Kanala wrote: >>>> sdw_handle_slave_alerts() only reads DP0_INT, and so can only ever see >>>> SDCA_CASCADE, when the peripheral enumerates with a non-zero class_id. >>>> That is what the SDCA amendment requires, and it holds for most SDCA >>>> peripherals. >>>> >>>> A peripheral that enumerates with DevId_5 == 0 has its SDCA interrupts >>>> left invisible to the bus driver: SDCA_CASCADE is never read, so >>>> slave_notify is never set from it, and if the peripheral also masks >>>> SCP_INT1.IMPL_DEF there is no other path to it either. Neither >>>> handle_nested_irq() nor .interrupt_callback() is ever reached and the >>>> SDCA regmap-irq handlers for its Functions never run, so interrupt >>>> driven features such as jack detection silently do nothing. WCD9378 is >>>> one such peripheral. >>>> >>>> Fall back to sdca_data.num_functions when class_id is zero. It is >>>> already maintained for every SDCA peripheral: the ACPI path fills it in >>>> from the DisCo tables, and a peripheral with no DisCo enumeration seeds >>>> it from its own .probe, in both cases long before an SDCA interrupt can >>>> be unmasked. No new property or quirk is needed, and nothing changes >>>> for a peripheral that reports its class_id correctly. >>> >>> This would work to cover this very odd corner case. >>> >>> Just wondering if it could be improved to only deal with SDCA cascade >>> *if* there are actually interrupts reported. the num_functions > 0 >>> criterion is rather broad, a device such as a simple amplifier could be >>> built in such a way that no interrupts are reported, ever. With the >>> suggested solution one would read a register for no good reason. It's >>> not that bad, but it's not great either. >> >> I don't think the additional check broadens things much in practice. >> Devices with a valid SDCA class_id already read DP0_INT on every alert >> today, regardless of whether any SDCA interrupts are ultimately >> reported. The added num_functions check only affects class_id == 0 >> devices, so the corner case you're describing would need to both >> enumerate with class_id == 0 and have no SDCA interrupt sources. > well, we could also change the behavior for 'normal' devices with a > valid class_id... > That way no need to special case this problematic device, and everyone > benefits by only reading DP0 if there is actually an interrupt to handle. The challenge is determining what we'd use as the condition. DP0_INT feeds both the nested-IRQ path and sdca_cascade handling, and SDCA peripherals don't all appear to consume interrupt information in the same way. I'm not sure we have a reliable existing indicator that would let us safely determine when a DP0_INT read can be skipped for all SDCA devices. Did you have something specific in mind?