From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 D5A4745BD78 for ; Wed, 1 Jul 2026 11:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782904775; cv=none; b=lBadBYRAOP6YYOBKK27dTrsAfv7NZqrlwO+oHUBMMD67jXFgt1W2j5ydeTGkY34Xa2uRHQWQ+KTH2+zZavmEHs+2HGLWTnzmcSE04L38tBvpba99/RlXMxjwiHlbWa6bBa/NKVc9hBo5LFvXnwSpRygOCwy6rrRAn3jtP49/log= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782904775; c=relaxed/simple; bh=Ua0ef1yufrvAgyuq1JcYRzLNA3rEellk2uJBPX5w7XI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TtjLGBogKp51V+LTRr8k4h4oAesHqubzpp/nlwAS/ehMJ4D2kPu8tWXGp/K4DWHor+8m3Tu4DoVJFUFb3c+2lX1/RvTL68EuMaiLrwYx808XhFM++5gKcA74thKtYAXurFBWi6aJbJsLnIU5N3Ooz+P96mWcEJtYvXpgYxGrMWM= 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=gwxZyeyl; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=IXQZDHdW; arc=none smtp.client-ip=205.220.180.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="gwxZyeyl"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="IXQZDHdW" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 661A8vWl753533 for ; Wed, 1 Jul 2026 11:19:33 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= URtox8zEzP/untTK+3HtClYPfjcDlUxDwjjp/zQVHfE=; b=gwxZyeylLOdVJC5D nuiZH2uaPci7Kc/y5/kYSdu7RKfA7lOmveWJy1VW4oLWcuH5fgjB1NchLw0Ke0dB UTygydJC/Obd+YoZgeo7oAUK8CXqIFKcX/nwHed63IOvth5hm1ULhYCZe82PI5BZ RlRRg5A//oin8Om9NSrqlkktK7tKPHQLLLKipvVr3iYaXvt6uAtRMLVGRPINW8fk pBCYjpq/e/ILwtMuiDELUSRDXVl0dBy4raERAUgi8GDprDV+Hvmv7CyPETGSejji 0A8KVrbPAPM7jw/ECj54GWkVvVpLsbR6U2kaDO/345lDmguhzCoiTY5cEcdMXOzn t/WJSA== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f4rsy2dby-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 01 Jul 2026 11:19:32 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-92e69a569ffso5934285a.2 for ; Wed, 01 Jul 2026 04:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782904772; x=1783509572; 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=URtox8zEzP/untTK+3HtClYPfjcDlUxDwjjp/zQVHfE=; b=IXQZDHdWWTas8L/k0iV2V4Bj6gU+wziQ0NUJvzzmSwzSiZ6AfVTAFXJ0HDeJG4F93z gNh6+dEjVQKHMmLRK+e2958LKGgvE9VsUx1szpJN+cuKcutjuwnl5ZR0fM7EAyQBat8Y 4CuKjD4YLtxz4qn2KKQf5duYldumaza5AJ0t1zGzBqLkCnj0peo1ZiZ1irYFxmdYvM0s HEbJxBt94JgbgQ/3XBFkR1Ej7NyKRqemG3Uuw90sPFA9tilVRnJDeLIf6DiNwVtuEFrZ PsiG+dYVN278uTNp4FlJ2JZKY+J9JltUTkNY1UOLLZHGq8g1TRXQti47QOJbYi9ovV0P VvYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782904772; x=1783509572; 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=URtox8zEzP/untTK+3HtClYPfjcDlUxDwjjp/zQVHfE=; b=ZZGrg9sBRklRXsFDn6vd2Dx2pKTq4pqx2JpJuCk/R/jZCjMavdPijSrTCncUYDRPgV 7lyv9qjbZWHJwVhrCD+tHdt3+9A7KGYXoWKzey4wdfFh1ynWUHIvFUf5TuG18UfIRHlU JHSUqOM+AaxrxPJwsTy2htSARaIqpoGffybSOhppecP9NsXVx2p3QcWKGAyPyJ5l8i6O UIAk2kjesHTK2C6msDZtd8pZMUHtHm5RRxVbvEIs2QgYOkUoQQD2ByOZtdMkg5C7mhIv Vv54kszzTyuJ6GppmuGzhom5M/uqpcoPCuHGQz3U4vt2Fwmg2ZGL24g2BiGiWYyih4/q 9Nug== X-Forwarded-Encrypted: i=1; AFNElJ/g0wEXgnGvmkHIdLLqf46XeDL0o7aDF7C2wLjxfQKB66komOW1C9d3dmlGsdxdLYaH4rm8nq8xyvCmxY8=@vger.kernel.org X-Gm-Message-State: AOJu0YwtfE8q5p30WuTszkNmOhzMQzPOpfgbMIW7sKYMiBiKOGgePpIc ybVs+nsUQj6sEvfjFuc4fVs3cxlRR2NegO/JZBN257rTNMqHmg6EX2PwnFg1KuELKMKX2oWhcjK EPme2miM2MMCne/2GiwPoMh3YLhWu1q7vWCA2RvRxBsnA+ldB7vrNvRdqFrs8Gmos3VI= X-Gm-Gg: AfdE7ck6Z2bRUDtcofQMYq5NTxEIizUnoJKHK08+7FF6Q1cQCGMElnGivlO7cec4TVe PfoHkEMM8/pgTN2ix/suhplMjii/PEC7bZL+o/9YsFRWxzYgTQq0OdvTcUgoy8ME50JZwolIMMo abDFwGTuvqry0Xwvew5IXYJkwFhGP5ReOZbBbSWinSyD5BbDz9aCVJXj4wkszWEw+6tAa+/tu5g erqd6ejp5vMAtOToiLVB3axUMMGmG1DEYBvJ1137OjQ97fKQ4ZF1y6Irjwqk/7xSI2e/yKFcCBe tmlFm8nf96fWD56S5B0AUfT84xGx11WxU+9qdX2ELAnDR0diqQUVLgsXjM/eZpnApTzAyP5K0Zt yXXEKMwjzDg2WdIO85lF+73/lVOyuldS6QhA= X-Received: by 2002:a05:622a:14d1:b0:51a:8c9b:6494 with SMTP id d75a77b69052e-51c26b42202mr8376121cf.11.1782904772051; Wed, 01 Jul 2026 04:19:32 -0700 (PDT) X-Received: by 2002:a05:622a:14d1:b0:51a:8c9b:6494 with SMTP id d75a77b69052e-51c26b42202mr8375671cf.11.1782904771316; Wed, 01 Jul 2026 04:19:31 -0700 (PDT) Received: from [192.168.120.170] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c1288d6b068sm261505466b.25.2026.07.01.04.19.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jul 2026 04:19:30 -0700 (PDT) Message-ID: <597fac9c-8522-449a-891c-2935382c0cd6@oss.qualcomm.com> Date: Wed, 1 Jul 2026 13:19:27 +0200 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 v2 4/6] Bluetooth: Introduce Qualcomm IPQ5018 IPC based HCI driver To: george.moussalem@outlook.com, Jens Axboe , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Johannes Berg , Jeff Johnson , Bartosz Golaszewski , Marcel Holtmann , Luiz Augusto von Dentz , Balakrishna Godavarthi , Rocky Liao , Saravana Kannan , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Philipp Zabel Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-remoteproc@vger.kernel.org References: <20260629-ipq5018-bluetooth-v2-0-02770f03b6bb@outlook.com> <20260629-ipq5018-bluetooth-v2-4-02770f03b6bb@outlook.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260629-ipq5018-bluetooth-v2-4-02770f03b6bb@outlook.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: h9ei2aUH66LZPV63luAtvKwEFelZkpX2 X-Authority-Analysis: v=2.4 cv=fLgJG5ae c=1 sm=1 tr=0 ts=6a44f7c4 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=UqCG9HQmAAAA:8 a=ZNUA0hKuP8YIc2uBTmcA:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAxMDExOSBTYWx0ZWRfXxT62s6PW2ua3 WhzOVzieDT3qtfEwpvsU4pgDnnJTniYlS1q4Lh9AX/0JuhoN5CthdGm50V07ZYeRpJqQ3hq7+Cu rr2zx9x1jCJHJhQJaPeVpQ8c7YDWvBc/rcrDUmo9TA/GggOXuRBTr2cOHvSeFNl2VTRKtLFzESX H2/jTWIvtWiXrDHLEgaAiSTCYKdo37RMdoBbzpfVtfFHZ/AgBkfi+tTZKfH66JBY5Y0mdBgITYF 1R+//GiD3q8iRc6V8ZhhxajP8AMfyIttFK/UJlIFJQuALbVhDPi++mddTCmG6kTNMXVv60excCz fP7YhXpD/m/bhWaFiUfmogtvg3vvlUpsOYUtDd5VrOXugn9W4wx4xRxuLRvg+4jhqPw5MUAgPgn et3GVtIivp7sHMEcQ/bL9uQxH2+C7P5r2Tc29xoyhR1GJ1U0tImfp37tMXvSqCazf4QvFCxeLOB C/RhWM0t9ZzT8lTHetA== X-Proofpoint-ORIG-GUID: h9ei2aUH66LZPV63luAtvKwEFelZkpX2 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAxMDExOSBTYWx0ZWRfXxvoI+ZtNfC0R w3JlkT3tlAGbaqvjl9o7b9n7QFVZ/MaY19GCxbz1Kwte7nDAKpEctc16aHlYCcTyINZ2XRyY/6M XmVbRBPkTOmtmLOipiV6D619xD4skWE= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-07-01_03,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 bulkscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607010119 On 6/29/26 3:01 PM, George Moussalem via B4 Relay wrote: > From: George Moussalem > > Add support for the Bluetooth controller found in the IPQ5018 SoC. > This driver implements firmware loading and the transport layer between > the HCI core and the Bluetooth controller. > > The firmware is loaded by the host into the dedicated reserved memory > carveout and authenticated by TrustZone. A Secure Channel Manager (SCM) > call safely brings the peripheral core out of reset. > > A shared memory ring buffer topology handles runtime data frame > transport between the host APSS and the controller. > > An outgoing APCS IPC bit and an incoming GIC interrupt handle host/guest > signaling. > > Signed-off-by: George Moussalem > --- [...] > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include I don't know for sure, but the amount of the includes suggests some may be unnecessary [...] > +static void btqcomipc_update_stats(struct hci_dev *hdev, struct sk_buff *skb); I don't think the forward-declaration is necessary > +static struct ring_buffer_info *btss_get_tx_rbuf(struct qcom_btss *desc, > + bool *is_sbuf_full) > +{ > + u8 idx; > + struct ring_buffer_info *rinfo; > + > + for (rinfo = &(desc->tx_ctxt->sring_buf_info); rinfo != NULL; > + rinfo = (struct ring_buffer_info *)(uintptr_t)(rinfo->next)) { > + idx = (rinfo->widx + 1) % (desc->tx_ctxt->smsg_buf_cnt); That's one complex for-loop! Maybe move the assignments into the loop body [...] > + /* Account for HCI packet type as it's not included in the skb payload */ > + len = (skb) ? skb->len + 1 : 0; Unnecessary parentheses, also in some other places > + memset(&aux_ptr, 0, sizeof(struct ipc_aux_ptr)); You can do aux_ptr = { } at declaration Konrad