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 D645546AECC 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 661A8v1d753532 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-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f4rsy2dc0-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-qt1-f200.google.com with SMTP id d75a77b69052e-51c19a2da0eso455271cf.0 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=romKJf3URJzroOCs+OSeuJv9qdFKDajUoU9aJInXmida2FRBzHPnUkoZzBislnjm75 YfJxIeYLIxdqQggLSt9nC3F/I3Tlesz24yHz0KuITuFLFBoLGgFVRINEev008f/dqjOF eM7rw9gBwKd9k0C/Suwqgwhx/f04EwMKfyARd7Ahou8Xun19IcpTS9Vwi5Ml0scpX24E w9CU3+/TFvBMIZV/p4qb8rhZRncZx1oqSjGhAXNLz4mHH8d8Pv93+9BIrgBCtMbEZ9RD TspAakNIvxdwBASOlT9gY7CthiMsh8JgjT3AfYPOkxlLY5dgRLbxj0y+TGQ0V2DZB3Pj aUHg== X-Forwarded-Encrypted: i=1; AFNElJ9lcbrDE4raduJQGHf7+aiUPE29hUputMPsu3My5ZwE+R7Fttpw7xZar3xQ2M0+k1jHM/CzGU8=@vger.kernel.org X-Gm-Message-State: AOJu0Yz4aIf20EMkutML2OP8QDyGohMuqs1l0PrKdCt0aYipuAEsuCry fIt3MuqfpQkeQazKJgwCqzyncJuqGXqiwfjE3U/Nmamd92HuZiynwYY4WR67R+hKQbNEbDzKriz tgmDBfoa9RT4wrSFrPxnpWdwPsQaEFnBhCB/9dqYoIuMhPcHZnAvWf7b862M= X-Gm-Gg: AfdE7ck5CgWbDfhZXFXbG4L0nIRO6xoXlD/op7ZnCzpZtcY4Yu7N0QLcWTMvEEXe4vF I5r7VZiTPonpu/L3rjjwXfCoRc5n1e58LG8QOhGmGaJVwAV5pWtOnq8AT3SUuxJZ0kTZiXMoXrb zGjQvb8FoZ7eXf/3ZLlMhgctTkKcT9Od7pB5OMCakkfNNevNbiEeRj55b2PtRy83fL8ONRa/hiA qOyEfgekS9WeVHrgC9LrxLa+7h/+tD0sAsRQG0YqtqKJiZ8VYNIRqsKHWfjwOJ0XzfnhEn8cSfy WmXHnrAs0ckcYFZlG+FsnmARNwplR7G0TjL6N845ByaZU7IT2mnCqdtLgQ6CLlEFx7znCJQgQhR 7LnHMXVl1coHq5QstG49mRGgksmOKfzuDKf0= X-Received: by 2002:a05:622a:14d1:b0:51a:8c9b:6494 with SMTP id d75a77b69052e-51c26b42202mr8376151cf.11.1782904772057; 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: netdev@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: UEiF5syjIHcydQYG9gWGRi6qJ6KuKDZ1 X-Authority-Analysis: v=2.4 cv=fLgJG5ae c=1 sm=1 tr=0 ts=6a44f7c4 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==: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=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzAxMDExOSBTYWx0ZWRfXzja4QHG4HD9C LGTa7sACExNUQI/j5+omkVppMnENnGH7uducRAvEnRhOa7322t48okxfnZvgDiPYs53u7ZSX5C2 S1PHyEM9flVZwuewGFr2xC7fkkylLDZ+zy6pwl5eq1y5zcXndTfy5AxB5RuBnXL2r4dcr8CusNL 1yIcMnVLOFBL6Cfx6nqKjtgHckSBA8d+qp09c3CV22TAVErELJHv2BVlrnORtwSiP0TRlD9EbaK ILUKRYHFs61teuxUziUjBrYUdUAJfTDoSaYJdyjXA3GTMBx5+dAX129kXMXL9D+/Dl4IEhm8+/K 9nItOI0OEW87h3rQ8WV4lbaFq4qhQN6R9gcW1HqdtZH+OQ22y1o6lBsVIEZ0lUKvZONw06b1o2i HqL9COsJaBX2gfZxOPpS5q3/hH4JzKmv3Zf85UiGtjLExunlFu2WMmqMdLyBj2ARh05GRBLdWwT urPVMga14hGvM+FW2aw== X-Proofpoint-ORIG-GUID: UEiF5syjIHcydQYG9gWGRi6qJ6KuKDZ1 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzAxMDExOSBTYWx0ZWRfX+dsH76R5gtUw yxLLLgFr2OMj/WJgphW33tnLSNbCWHPeHlQWkdPOOJhXxhIPZ7XTpKk3clQLO+wj5KFDMHTp54P pDmNTTP5Zx7ywd1S6iiF0b3l7NzIpcM= 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