mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zijun Hu <zijun.hu@oss.qualcomm.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Zijun Hu <zijun_hu@icloud.com>,
	linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: btusb: Add support for Qualcomm QCC2072
Date: Tue, 14 Jul 2026 21:48:20 +0800	[thread overview]
Message-ID: <3d681f10-959e-4d0e-99e5-a471ef8929a3@oss.qualcomm.com> (raw)
In-Reply-To: <CABBYNZJpdeoZ16bObLRPhng2dfyNeK9ix9_-z_hMZhJ0QxTxGg@mail.gmail.com>

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.



  reply	other threads:[~2026-07-14 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13  8:11 Zijun Hu
2026-07-13 20:45 ` Luiz Augusto von Dentz
2026-07-14 13:48   ` Zijun Hu [this message]
2026-07-14 14:29     ` Luiz Augusto von Dentz
2026-07-15  3:10       ` Zijun Hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d681f10-959e-4d0e-99e5-a471ef8929a3@oss.qualcomm.com \
    --to=zijun.hu@oss.qualcomm.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=zijun_hu@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®