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 CD79B477E4A for ; Tue, 14 Jul 2026 13:48:25 +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=1784036907; cv=none; b=czH0v7huPMS9HWBdVe+FtXli1W66Er3BWxf/o2oi6dpxMUJLjrxDmFExo8xoyAKiLH3Zgn9MTLDwYl73GMdhPoKDRvIwm4olw0mRHLhV8WwM5aIlPM1eyZ/t4GNiZYFxwoxJ7MglQI9lch2+2dVTP5Si/OlzkFpH8Kke4+fQBho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784036907; c=relaxed/simple; bh=/wE47tHx3aKn2MTkn9nYdI0y7clxrmOyavMLuXbTuBM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uc0ldd1FrXMCyHwqrijKOBk+qd0ibx5hK7doxELoXTcKkJXvYbajghaqFxbhAbMBQm0B4/FOfQB+n1qE5a2pgrYWU+5w7Ewkfgt25v2x13e3u1tTyOfY23dq0l2X6X+3ZuOsTAVggyjTxSyRuqcpstcGhzIj2DK9XvWD8pA0faM= 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=ThANVumK; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HNZlxQRQ; 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="ThANVumK"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HNZlxQRQ" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66EBOEGN108634 for ; Tue, 14 Jul 2026 13:48:25 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= chqKibaeCI1dGhNoDz95Zlo/hvuVQqKnNG+MSugrEmQ=; b=ThANVumKb8p0DdzW 6g0BXZa0QC7V5C7jniRweHJm8TPlmadQNO7mKewjflb9CPT1Ae8Pi4TBNthsaEIG gu+CSVQTlAKSv/gK4SU2abVXgnkxQqdfFp2omsXN1o5nUcIBtP3rDciw7VJepc3A qEpXPm07nD3hxPbHQt87vOKRuhH8zCVNgzvNzMezHhxk5bznEm2yejCyayjfeICH urAi1UWXvdFcJNF4DQJfvS2yTVAidCmmBMC8D7MysjmZs7m+zL7j8qHtqwesgmvc ktc+/XwtmlfZkZWwvYh69tMvntvUzl4GN1btjCyFGxpgLrxOwZRsFsS57x2gQqZy SRD2TQ== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fdesa9xad-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 14 Jul 2026 13:48:24 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2cae7a8b9easo10331155ad.3 for ; Tue, 14 Jul 2026 06:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784036904; x=1784641704; 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=chqKibaeCI1dGhNoDz95Zlo/hvuVQqKnNG+MSugrEmQ=; b=HNZlxQRQefgEMWNn+O812Tjj7NcVE4hSQpbdK/I3a8kGw8pVUlVOo1e/SxTESuyuFr usMvoHTf5KXvC3otbms8yfq6ypM561UxFY6cxGRXuYjtBhm/p313YeJ2lMe3gSZNqUH5 CZR7XKqlJYC5XLxVLX2G3rMEwbaD7EWq1awDGxbyzO+TY9wGGiwRbVxfoeLqmECrExKl NEXTox0yC+HCChOninKLaw+Rvdl5RLGbR59N5wqkXPMuqeAj1iDQjj6GuRNu6HdNqF/G Zsvs9Q99OCMq+UFvOU8iLXL8VrKCeHag8TmAf8A1lZILLgby6aNZ5ZAlx64gH9dD6pfx 0Z2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784036904; x=1784641704; 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=chqKibaeCI1dGhNoDz95Zlo/hvuVQqKnNG+MSugrEmQ=; b=Vo/+PEdJgQVFXx2F15JNnUXwB3ix3IYE0u1E8tPh71gqDkhY2CeXcMNJAbERo6lxzJ yY2PhSDPD7NbG7SkZlx9tClGhtYhSMNGy79Dm9IJCxWDVPriht2thIMXHyoq8UbqfJLL MfBebpvv52d+IR0Zx0KjzyR7u38MeIPPVZ9RzbpRWr7muVqCPvaanYxyF57vLh706cnm ipUp/+mI9MIBZtKYBYgd2J7gTZCbABVdI1bllbfyr0P2d1Z+8rWvCwLVO1k8LHyuDX12 F68EZAE5R8Cu7AbiwiSq1f2jeUXJon2CZ+opnQcB0oJvPmIDNAZAhRLQOyFrc86oJCfh /hNg== X-Forwarded-Encrypted: i=1; AHgh+RrDm/wKy0CNPaX6zJgR11VIAg5/bJRzOYBHYDPBnJqO+bQ2Rycd/WRd3BLVG92NeK5dm1EowWlTFKuc0p8=@vger.kernel.org X-Gm-Message-State: AOJu0YyxpLlpNURzvAUVEVIia+9d9lSTet3lzCFlShxiTRuxhx0kukHS roZJ4qQg9Y5YYHdfNN3H/YCabpzMiD7eSlm5S0YbUaFFTRY8DUYghoIe+1Exk7iGmWWLJj6aoTe oqGcTkV4o+Mycr/Dejwrx3TF1N8A/G/7QZCb78p/TkBimxr5v6IotX7Rl4jvPU4lV+L3avEqL9s c= X-Gm-Gg: AfdE7clfQFGkxVC1gcu/s47eVNLB6JoUGrU6B9xai8labs/lbMsA/BELwKNmzGny+zJ XrXE04vQdZX1JqmSu18Ze7ZeR59KlqdawEwPeDtc90uhBZJ6urcLEeMaszH68jr0BJQWP65EwxP YK98qlCIF4mR/HZ1QzLVrcnMqeCGi7Jfca95s2NDqgtzwwF1G2mnFzgsRY2yUQC79JCbmfloN8E jXLCs6KKXiQ4c5oadicfho8WTyaZnP6LsXaIf2wHB3azLSYpwTJsqqAI/O674002SvuWyHH6zV8 ayyjFsmQ7D6QhVRQlvwr3pWQG4/9n4I0yCS+CB0tkCuwpuJYlnf4PVH8AFiscjvWoeszcv2XIPc 9b6wpyS9lsX9Xl5oYUbdVNfK2NxQFHeeOQg8ccDNr/5YpKc/XCukhgf4YACiiiHZ5YGEu06vuN9 k= X-Received: by 2002:a05:6a21:a344:b0:3b4:895f:6abf with SMTP id adf61e73a8af0-3c110a23efemr10499626637.3.1784036904167; Tue, 14 Jul 2026 06:48:24 -0700 (PDT) X-Received: by 2002:a05:6a21:a344:b0:3b4:895f:6abf with SMTP id adf61e73a8af0-3c110a23efemr10499587637.3.1784036903570; Tue, 14 Jul 2026 06:48:23 -0700 (PDT) Received: from [10.133.33.8] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ca5b3162b59sm9829275a12.16.2026.07.14.06.48.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jul 2026 06:48:23 -0700 (PDT) Message-ID: <3d681f10-959e-4d0e-99e5-a471ef8929a3@oss.qualcomm.com> Date: Tue, 14 Jul 2026 21:48:20 +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] Bluetooth: btusb: Add support for Qualcomm QCC2072 To: Luiz Augusto von Dentz Cc: Marcel Holtmann , Zijun Hu , linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org References: <20260713-btusb_qcom-v1-1-39cabc0dd601@oss.qualcomm.com> Content-Language: en-US From: Zijun Hu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNzE0MDE0NCBTYWx0ZWRfXyvXzzRWO6q+x 1BYa/Jl27Et21sjZq6aczsatg65gNSX8Njzy8Q6NSk70oezQdKSVC15NWjuwUsKbGBGTE/8ocED rjcL8j8cpS6oF3J5AKrjz3pbTFN0XbQ= X-Proofpoint-GUID: TU8D9ZMwZ30qra_0U0wkcMtWnbOLhitu X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzE0MDE0NCBTYWx0ZWRfX0GvAI0fRDRZe wXorAPRanhVOHJAWq/J+4DWsZlTe8xhZxtO/Vx91pVpnCPCrdrj4/IwDDz0YpFPTdTUO5W3nKWq 3uV3FEyHlrFMCYhpeSF3cQ/SaZLv/mjtskg2LNpCPMOKkL1ASjPr6PLLH5NMbQfTvL8GgY5GNpN Ry5FKGkCEDeW9TXFdwpSKwavsHKxSyXwR30bZQTEGZZCsV6u9UPMXOp6/YkiW5G6AtICXD/9qtz fIpMvVwiYn9s0sUWZY5Yl7pAEQqYx5nUntlkcwhmFNM7tb2ZyOWVj/hkXghgMRrjg+DdOWLTjWb CXoPy5bXn2d4EccUgyn/TYjhpWnS3XazoeCaV31Z8z/O5GhD3Rn9EtXKxrpmx+4gsYeUobW0KIP +0t3QtWcV6orhCEu8V50Go7sx0CRvOcKeIkiIPd6SgTv4YNpPOOq8xIuGl7Ot9cUn8jq1WscD4n L+IkQLShbIGIasGV2wg== X-Authority-Analysis: v=2.4 cv=PZLPQChd c=1 sm=1 tr=0 ts=6a563e28 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=QYaiAvbqNJ8jCOfhceIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-ORIG-GUID: TU8D9ZMwZ30qra_0U0wkcMtWnbOLhitu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-14_03,2026-07-10_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 clxscore=1015 impostorscore=0 bulkscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607140144 On 7/14/2026 4:45 AM, Luiz Augusto von Dentz wrote: >> To avoid adding large vendor-specific code into the BTUSB main >> file, add btusb_qcom.c/.h to support multi-subsystem BT chips. > Ok, so this is not the first time we are seeing the driver want to > have it own processing of HCI traffic, but instead of doing post host > processing it is doing pre host, which creates quite a few issues > since 1. you can use safer skb helper like skb_pull_data and 2. > requires to do HCI processing of traffic not meant to the driver, > besides not being able to use something like struct hci_ev table that > would help to avoid having the same bugs we fixed over the years. > > So what we might have to do is some way to for drivers to register > their own event table, provided they don't conflict with the host, or > if it just HCI_EV_VENDOR then perhaps that can be done with just > hci->vendor_ev callback. Hi Luiz, Thank you for the advice. Let me clarify the design: A. Why pre-host processing? QCC2072's endpoints carry non-BT frames (PERI event and PERI ACL) alongside BT frames. btusb_qcom.c must first reassemble the raw byte stream into complete frames — of either kind. Once assembled, non-BT frames are intercepted and handled locally; BT frames are passed up to the stack untouched. B. What to do with non-BT frames There are two options: 1. Don't let them reach the host stack at all, or 2. Route them through the stack by an opaque channel such as HCI_VENDOR_PKT — defined by the stack but with no implementation yet. C. Why not skb_pull_data() for non-BT frames We want to preserve and log the complete frame for diagnostics, so we deliberately avoid skb_pull_data(). We'll also look into leveraging hci_ev table for non-BT frame handling in v2.