From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ABA533D505 for ; Fri, 13 Mar 2026 02:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773369902; cv=none; b=MYLoRySzE6nClPOh4R5apcPhyzuPd08S6Aw9cTSoxBUL8WOlcnKuVTx4gKYUPvPfcq73acXhz93pw84X27nKvg6CLHWM6h9Nxh6PuNWgV2BnKFTGr+1ELOAuy2MF9/khtvmNslJhxNhNw+pmB5pw36hKgmRF/UW7h+6T+Sp8/Bk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773369902; c=relaxed/simple; bh=8/NJB35AdKrR/aXcBjIDCakUMBw+grM65cuAIzxZVGU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=h+aoWdKj84Eq1DkFzuO2YHGrNESkMfxb/LeGoeMCAlcdtcFVNysFxVUIYvWoEyszD+OGoWB3KWYeMJnQK/jFJKHcDmUwHROvtSyrPxUHO7S04lE7UhubGuiPHb9ehMuGJuadeA5xbYs1qbjWiypN+9uAWwXDtcG4BTLL/iI1Tdg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=HJbRNwxa; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=QyrecCBJ; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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.b="HJbRNwxa"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="QyrecCBJ" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62D17lXR2612593 for ; Fri, 13 Mar 2026 02:44:59 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= fRAKzLrTUACG7+9Y1arYEb3137UjTwTGDq/sWJpNAI8=; b=HJbRNwxaSht0Dk22 TfShIPbO79ZK3o9dfg7GovCtsL1sB8V+w1zrS6fZ48wzGXq8DBCUNCehO3ITYGt8 052HTH88TKahiTOmMvtMSfvLNCLFvTyGqtLL746TiZq4XcxRZcpSTApyNTNczWbO ZL3np0Jck6YC/6E58T+MxxbxNensbAyYLFhjIPd0TfY3ZZp6W+ItKZV+8IKH8vb5 zqQM7Nr9uEAPaXKSbXUhrNp4HdLtT0RfxpcAD5gNm434XKI8qM46q3opyl5K+6Ey BrUMw3n9Kday/Hpc3LFb/W/l/Yn09jynukMa5RI+5U3cCqegE5Fj7OJYbXjC4F4O cQNxNQ== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cv8n7g7m4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 13 Mar 2026 02:44:59 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-82a1436347eso347535b3a.2 for ; Thu, 12 Mar 2026 19:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773369899; x=1773974699; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fRAKzLrTUACG7+9Y1arYEb3137UjTwTGDq/sWJpNAI8=; b=QyrecCBJGm2HN5m2rZ+e3uuz8ATTxtvlc2DXsqKF05fUhEH727CuDiCUJDTKsjU1HR 7KCZkITc/vvsqMNJZZsh6zQtb4/XNq3rHAuSsCREzhE4NQpVmlLBjQh5/Mmj43qaxuev 226Ciwol4/ggWwbZqPYpVEbft6T7NySrrtGl6ONuQezvaMOq7IZUtMLw2SnaKLbk1Wp3 4Nj4noOwwg0jdhBMeYS1wmUj1sQUI4lr7andLNRd+aWW5Ak173HO/yRIVNoDA42HgRXa yiZTpwCVY6jvWWNDB9E+PhMYMaIrQdyVE/4FVuU7vp+JQ6Qwt1hMbBeX7yJH5989JaBJ H7uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773369899; x=1773974699; h=content-transfer-encoding:in-reply-to:content-language:from :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; bh=fRAKzLrTUACG7+9Y1arYEb3137UjTwTGDq/sWJpNAI8=; b=dQcOIrlrs59FlJZl1X2U2ny+mDmobdLtjBNccPFf33pN23OlFb5ss6HqOXk8gyEwmR FVyvuVM4PcNZtRU6rb/GpzQAokwzpZlBMxy3fxygk+neLJvIytKimGCwCsLwLiw6ngyG b0b0VuiGWr9HvXdzLx8sZGpM3o43Q+YahF51UaluCb4VLiP0KeAyP6fb0Wd84H3LUvHs EgFkJtAain/hLTU4vvLUGh8LAcAO1gRHrAA8Wf2rxwTcr+Oju+mbk33bGyxoK+d3Qc1T cR6IW0lNrytP6BDRmN9nW9mLmi4uq81E2AVVRV776mYPr0ZRpqrdPN/TURI2yXpQnDd7 EtOQ== X-Forwarded-Encrypted: i=1; AJvYcCWJwwwu2GJVf3XKbFyjcnFM/J/ubLvfAQprilFXXdUIxCoV/N737vQHu6/3ghjAaoqSweJUw2dPfWEl3mM=@vger.kernel.org X-Gm-Message-State: AOJu0YwKI6wkf7WcE4JdSnYNUlBRonKuuKpudWQpMsoOcULreuyQivEB UGT2xJCGjAiiJFlIPwziAYN1ma6oyqEimVwcfOV5RcplKibxaNO5Lz+QM/Q+Jn8duo3V4FUeZ2y AsKlmBfoUeGXCcSkyZoexyk/RvDDQ/DSZqop0DE49Q3Ob0P95S0ykdxG2j229mI18avY= X-Gm-Gg: ATEYQzz4CrYPE2e9nVW+AN3JpV1coLwEplP1Og1zwh3Zn/Ta8L9zB92tF8yLlnQX7/0 9NrUQOGOOU9OTY8I9aQvz1OcKUkQFIGB3QROuKRfftWdBnQFBFvQMY93oXSjy75FmjtvhV0Dll6 pWYfST8PgD6XFhefC2Xa5eORg7oreMJh0teM9Q+98cbVslLM/EDOzXFvfJv4APBehkdFbIHBLGZ R40l1wPtkb1RdvmiwcUp0w039F1ul/Ni6f6QJMBYHyFmI47ZJ1HX+fAFGuAxfkNxSyIAx2BY13T EuQkIvt/Zl3HWggy03lI2055W7oGCEewZdTDV+Iy+5bk/MsY4HGNxlkMrBapJ1XPb4JZ15JOBBs UPF2p3fp611pxVl+PUsXEWccelx1iGbaxfXAnC39RbY0Olg3gCVekAHwYDGVRqpoDsRKFFjROQ8 lbd2gll4DW9hGWGjrydw== X-Received: by 2002:a05:6a00:909b:b0:829:803e:6798 with SMTP id d2e1a72fcca58-82a1990205fmr1198291b3a.56.1773369898697; Thu, 12 Mar 2026 19:44:58 -0700 (PDT) X-Received: by 2002:a05:6a00:909b:b0:829:803e:6798 with SMTP id d2e1a72fcca58-82a1990205fmr1198279b3a.56.1773369898268; Thu, 12 Mar 2026 19:44:58 -0700 (PDT) Received: from [10.133.33.71] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82a0724407csm4196019b3a.8.2026.03.12.19.44.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Mar 2026 19:44:58 -0700 (PDT) Message-ID: <6948d3fb-d3aa-47c8-9a40-4ad8e3b72ce7@oss.qualcomm.com> Date: Fri, 13 Mar 2026 10:44:52 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4] wifi: ath12k: fix endianness handling for SRNG ring pointer accesses To: Alexander Wilhelm , Jeff Johnson Cc: ath12k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260311102416.224621-1-alexander.wilhelm@westermo.com> From: Baochen Qiang Content-Language: en-US In-Reply-To: <20260311102416.224621-1-alexander.wilhelm@westermo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: g4n-d1ILKtjzeh_8wuLtz7nfeuplpO3B X-Proofpoint-GUID: g4n-d1ILKtjzeh_8wuLtz7nfeuplpO3B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEzMDAyMSBTYWx0ZWRfX26jy2BoSWb9C 5uwALb4KE/w/0Xd+S1eUSYCfmbIOj3UNiNo+DayWIXJAaCKg1J4dQJXi0SKcqodpoPL9C7RoUcL 94t6bQZkKwbftFoRDfKWEvFJAJpLNuE/w2e/klYV2NFB0Ccga7xHuK4wlciKKktuBVcoW3FnB+u oo2okaRXAjcjr1+GR5dGl59rMvZTd8GWWvTNML5ZkTqaebZyqvg05BS1tHKuM9AU5Q/rYok0qpE ziYVxjsq4QGO+vWa/2/Jo6l0621jUPB/twqyhDXBewrhOcfPW+eYYBl5PV7gmcY8LbdMjm5cT5z FGNm5Ha+HJQ8U0LXelLE2oOF3h0lUCLSeSZHuONycOBGVXYseP/YAxOX74NAQ6sdPyKA9TdUfY/ 7sBjsk/kXS9wIypF1jEh1uE8mda6e8RQgSyCShjWmAuYiHVMxIw0tdGATJchOWSXbOiQH5FhVrf 6ZrfYDJWv6nn9RwvYeQ== X-Authority-Analysis: v=2.4 cv=CpCys34D c=1 sm=1 tr=0 ts=69b37a2b cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=N9GNhs4bAAAA:8 a=EUspDBNiAAAA:8 a=mClSoXhwh1Xnl1UuZHkA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 a=PZhj9NlD-CKO8hVp7yCs:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-12_03,2026-03-12_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 priorityscore=1501 adultscore=0 suspectscore=0 bulkscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603130021 On 3/11/2026 6:24 PM, Alexander Wilhelm wrote: > The SRNG head and tail ring pointers are stored in device memory as > little-endian values. On big-endian systems, direct dereferencing of these > pointers leads to incorrect values being read or written, causing ring > management issues and potentially breaking data flow. > > This patch ensures all accesses to SRNG ring pointers use the appropriate > endianness conversions. This affects both read and write paths for source > and destination rings, as well as debug output. The changes guarantee > correct operation on both little- and big-endian architectures. > > Signed-off-by: Alexander Wilhelm > Reviewed-by: Baochen Qiang > --- > Changes in v4: > - Rebase on latest 'ath' master > - Remove volatile from `hp_addr` due to the `checkpatch.pl` warning by 'cgeckpatch.pl wanring' did you mean below ? " WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst #64: FILE: drivers/net/wireless/ath/ath12k/hal.c:504: + *(volatile __le32 *)srng->u.src_ring.tp_addr); " But the documentation clearly says that the case here is one of a few rare situations where volatile makes sense: " - Pointers to data structures in coherent memory which might be modified by I/O devices can, sometimes, legitimately be volatile. A ring buffer used by a network adapter, where that adapter changes pointers to indicate which descriptors have been processed, is an example of this type of situation. "