From: Pascal Giard <evilynux@gmail.com>
To: marcel@holtmann.org, luiz.dentz@gmail.com
Cc: linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Pascal Giard <pascal.giard@etsmtl.ca>
Subject: [PATCH] Bluetooth: Add filter for Qualcomm debug packets
Date: Fri, 3 Oct 2025 16:58:37 -0400 [thread overview]
Message-ID: <20251003205837.10748-1-pascal.giard@etsmtl.ca> (raw)
Some Qualcomm Bluetooth controllers, e.g., QCNFA765 send debug packets
as ACL frames with header 0x2EDC. The kernel misinterprets these as
malformed ACL packets, causing repeated errors:
Bluetooth: hci0: ACL packet for unknown connection handle 3804
This can occur hundreds of times per minute, greatly cluttering logs.
On my computer, I am observing approximately 7 messages per second
when streaming audio to a speaker.
For Qualcomm controllers exchanging over UART, hci_qca.c already
filters out these debug packets. This patch is for controllers
not going through UART, but USB.
This patch filters these packets in btusb_recv_acl() before they reach
the HCI layer, redirecting them to hci_recv_diag().
Tested on: Thinkpad T14 gen2 (AMD) with QCNFA765, kernel 6.16.9
Signed-off-by: Pascal Giard <pascal.giard@etsmtl.ca>
---
drivers/bluetooth/btusb.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 5e9ebf0c5312..900400646315 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -68,6 +68,9 @@ static struct usb_driver btusb_driver;
#define BTUSB_ACTIONS_SEMI BIT(27)
#define BTUSB_BARROT BIT(28)
+/* Qualcomm firmware debug packets header */
+#define QCA_DEBUG_HEADER 0x2EDC
+
static const struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */
{ USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
@@ -1229,6 +1232,12 @@ static int btusb_recv_intr(struct btusb_data *data, void *buffer, int count)
static int btusb_recv_acl(struct btusb_data *data, struct sk_buff *skb)
{
+ /* Drop QCA firmware debug packets sent as ACL frames */
+ if (skb->len >= 2) {
+ if (get_unaligned_le16(skb->data) == QCA_DEBUG_HEADER)
+ return hci_recv_diag(data->hdev, skb);
+ }
+
/* Only queue ACL packet if intr_interval is set as it means
* force_poll_sync has been enabled.
*/
--
2.51.0
next reply other threads:[~2025-10-03 20:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 20:58 Pascal Giard [this message]
2025-10-06 17:21 ` Luiz Augusto von Dentz
2025-10-07 14:16 ` Pascal Giard
2025-10-07 14:45 ` Luiz Augusto von Dentz
2025-10-07 15:37 ` Pascal Giard
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=20251003205837.10748-1-pascal.giard@etsmtl.ca \
--to=evilynux@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=pascal.giard@etsmtl.ca \
/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®