Linux bluetooth development
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "luke-yj.chen" <luke-yj.chen@mediatek.com>,
	Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
	Sasha Levin <sashal@kernel.org>,
	marcel@holtmann.org, luiz.dentz@gmail.com,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 6.18] Bluetooth: btusb: MT7925: Add VID/PID 13d3/3609
Date: Mon, 31 Aug 2026 09:25:38 -0400	[thread overview]
Message-ID: <20260831133314.4125787-310-sashal@kernel.org> (raw)
In-Reply-To: <20260831133314.4125787-1-sashal@kernel.org>

From: "luke-yj.chen" <luke-yj.chen@mediatek.com>

[ Upstream commit a55ef87b61b26097373fe8cbd2ead36582a8df4f ]

Add VID 13d3 & PID 3609 for MediaTek MT7925 USB Bluetooth chip.

The information in /sys/kernel/debug/usb/devices about the Bluetooth
device is listed as the below.

T:  Bus=06 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=13d3 ProdID=3609 Rev= 1.00
S:  Manufacturer=MediaTek Inc.
S:  Product=Wireless_Device
S:  SerialNumber=000000000
C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
A:  FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=125us
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
I:  If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=8a(I) Atr=03(Int.) MxPS=  64 Ivl=125us
E:  Ad=0a(O) Atr=03(Int.) MxPS=  64 Ivl=125us
I:* If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us
E:  Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us

Signed-off-by: luke-yj.chen <luke-yj.chen@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

Connection lost, reconnecting to https://agentn.us.api5.cursor.sh
(attempt 1)...
Retry attempt 1...
Connection lost, reconnecting to https://agentn.us.api5.cursor.sh
(attempt 2)...
Retry attempt 2...
Connection lost, reconnecting to https://agentn.us.api5.cursor.sh
(attempt 3)...
Retry attempt 3...
## Phase 1: Commit Message Forensics

**Step 1.1 — Subject line**
Record: `[Bluetooth: btusb: MT7925] [add] Add VID/PID 13d3/3609 for
MediaTek MT7925 USB Bluetooth chip`

**Step 1.2 — Tags**
Record:
- `Signed-off-by: luke-yj.chen <luke-yj.chen@mediatek.com>` (author,
  MediaTek)
- `Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>`
  (Bluetooth maintainer committer)
- No `Fixes:`, `Reported-by:`, `Tested-by:`, `Reviewed-by:`, `Acked-
  by:`, `Cc: stable@vger.kernel.org`, or `Link:` tags

**Step 1.3 — Body**
Record: Adds USB VID 0x13d3 / PID 0x3609 for a MediaTek MT7925 combo
Bluetooth interface. Includes `/sys/kernel/debug/usb/devices` output
showing a standard 3-interface wireless controller
(`Manufacturer=MediaTek Inc.`, `Product=Wireless_Device`, `Driver=btusb`
on HCI interfaces). Symptom without the ID: device may bind generically
but lacks MediaTek-specific quirk flags, so Bluetooth does not work
correctly on this hardware variant.

**Step 1.4 — Hidden bug fix?**
Record: Not disguised as cleanup — it is an explicit hardware-enablement
ID addition. Functionally it fixes non-working Bluetooth on
laptops/modules using this USB ID.

---

## Phase 2: Diff Analysis

**Step 2.1 — Inventory**
Record:
- Files: `drivers/bluetooth/btusb.c` (+2 lines)
- Function/table: `quirks_table[]`
- Scope: single-file, surgical, 2-line addition

**Step 2.2 — Code flow**
Record:
- **Before:** `0x13d3:0x3609` not in `quirks_table[]`; probe falls
  through generic `btusb_table` match without `BTUSB_MEDIATEK |
  BTUSB_WIDEBAND_SPEECH`.
- **After:** Device gets `BTUSB_MEDIATEK | BTUSB_WIDEBAND_SPEECH` via
  `quirks_table` lookup during `btusb_probe()`.
- Affected path: USB device enumeration / driver probe for this
  hardware.

**Step 2.3 — Bug mechanism**
Record: **Hardware quirk / device ID** — missing USB ID entry. Without
it, `btusb_probe()` at lines 4018–4024 does not upgrade the match from
generic Bluetooth to MediaTek-specific handling, so `BTUSB_MEDIATEK`
setup (btmtk paths, firmware, WBS) is never applied.

**Step 2.4 — Fix quality**
Record: Obviously correct — identical pattern to neighboring entries
(`0x3608`, `0x3613`, etc.). Minimal risk; no API/locking changes.

---

## Phase 3: Git History Investigation

**Step 3.1 — Blame**
Record: Insertion point is between commits adding `0x3608`
(`cb45396f96f96`, Sep 2024) and `0x3613` (`bbf56029322c0`, May 2025).
Gap at `0x3609` is an omission, not a post-branch regression.

**Step 3.2 — Fixes: tag**
Record: N/A — no `Fixes:` tag.

**Step 3.3 — Related changes**
Record: Multiple sibling MT7925 ID commits already in
`stable/linux-6.18.y`: `bbf56029322c0` (13d3/3613), `576952cf981b7`
(13d3/3627), `5bd5c716f7ec3` (13d3/3630), `f63f401130e5c` (13d3/3628),
etc. Standalone 1/1 patch.

**Step 3.4 — Author context**
Record: Author is MediaTek (`luke-yj.chen@mediatek.com`). Committed by
Bluetooth maintainer Luiz Augusto von Dentz. Same pattern as other
MediaTek ID submissions.

**Step 3.5 — Dependencies**
Record: None. Requires only existing `BTUSB_MEDIATEK`,
`BTUSB_WIDEBAND_SPEECH`, and `btmtk` support — all present in this tree.

---

## Phase 4: Mailing List and External Research

**Step 4.1 — Original discussion**
Record:
- Commit: `a55ef87b61b26097373fe8cbd2ead36582a8df4f`
- `b4 dig -c a55ef87b61b26`:
  https://patch.msgid.link/20260512060318.3288273-1-luke-
  yj.chen@mediatek.com
- `b4 dig -a`: v1 (2026-05-12) and v2 (2026-05-12); committed version
  matches v2
- No stable nomination or NAK found in thread mbox

**Step 4.2 — Reviewers**
Record: `b4 dig -w` CC'd Marcel Holtmann, Johan Hedberg, Luiz Von Dentz,
Sean Wang, linux-bluetooth, linux-mediatek.

**Step 4.3 — Bug report**
Record: N/A — hardware ID submission with USB descriptor evidence; no
syzbot/bugzilla.

**Step 4.4 — Series context**
Record: Standalone single-patch series (v1→v2).

**Step 4.5 — Stable list**
Record: Lore fetch blocked by bot protection for manual stable-list
search; no stable discussion found in downloaded mbox.

---

## Phase 5: Code Semantic Analysis

**Step 5.1 — Key functions**
Record: `quirks_table[]` (data), consumed in `btusb_probe()`.

**Step 5.2 — Callers**
Record: `btusb_probe()` called from USB core on device plug/enumeration
— standard hotplug path.

**Step 5.3 — Callees / effects**
Record: When `BTUSB_MEDIATEK` is set, probe configures
`btusb_mtk_setup`, `btmtk` send/recv, suspend/resume, and firmware
loading. When `BTUSB_WIDEBAND_SPEECH` is set,
`HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED` is enabled (line 4314).

**Step 5.4 — Reachability**
Record: Triggered by plugging in or booting with hardware using
`13d3:3609`. Common laptop WiFi+BT combo path.

**Step 5.5 — Similar patterns**
Record: ~15+ other `13d3:36xx` MT7925 entries in the same table section;
this fills a gap between `0x3608` and `0x3613`.

---

## Phase 6: Cross-Reference Against Local Tree

**Step 6.1 — Buggy code exists?**
Record:
- Local tree: **linux-6.18.y**, `6.18.44` (`v6.18.44-1-g2736c32da98b9`)
- `0x13d3:0x3609` **absent** — confirmed gap at lines 754–756 between
  `0x3608` and `0x3613`
- Commit `a55ef87b61b26` **not** an ancestor of HEAD (`git merge-base
  --is-ancestor` exit 1)
- MT7925 infrastructure present: `btmtk.c` handles `0x7925`,
  `FIRMWARE_MT7925` defined, `CONFIG_BT_HCIBTUSB_MTK` in Kconfig

**Step 6.2 — Backport complications**
Record: `git apply --check` succeeds cleanly on current `btusb.c`.
Expected: trivial apply.

**Step 6.3 — Related fixes already present?**
Record: Sibling MT7925 IDs already in stable; `0x3609` specifically is
missing.

---

## Phase 7: Subsystem Context

**Step 7.1 — Subsystem**
Record: `drivers/bluetooth/btusb.c` — Bluetooth USB HCI driver.
Criticality: **IMPORTANT** (peripheral driver, but affects real laptop
hardware).

**Step 7.2 — Activity**
Record: Active — multiple MT7925 ID additions through 2025–2026 already
landed in this stable series.

---

## Phase 8: Impact and Risk Assessment

**Step 8.1 — Who is affected**
Record: Users with MediaTek MT7925 USB Bluetooth at `13d3:3609` (likely
recent laptops with IMC/ASUS-style combo modules).

**Step 8.2 — Trigger**
Record: Device enumeration at boot or hotplug. Unprivileged user cannot
directly trigger, but any system with this hardware hits it
automatically.

**Step 8.3 — Failure mode**
Record: Bluetooth non-functional or severely broken (wrong driver path,
no mtk setup/firmware, no WBS). Severity: **MEDIUM** for affected users
(complete feature loss, not kernel crash).

**Step 8.4 — Risk vs benefit**
Record:
- Benefit: **HIGH** for affected hardware (restores Bluetooth)
- Risk: **VERY LOW** (2-line ID table entry, identical to proven
  siblings)
- Ratio: strongly favors backport

---

## Phase 9: Final Synthesis

**Evidence FOR:**
- Classic stable exception: new USB device ID for existing driver
- MT7925/btusb/btmtk support already in 6.18.y
- Sibling IDs (3613, 3627, 3628, 3630) already backported to this tree
- Patch applies cleanly
- Committed by Bluetooth maintainer
- Real hardware with documented USB descriptors

**Evidence AGAINST:**
- None significant; not a new driver, API, or refactor

**Stable rules checklist:**
1. Obviously correct and tested? **PASS** — pattern matches ~15 existing
   entries; maintainer committed
2. Fixes real bug affecting users? **PASS** — Bluetooth broken without
   ID
3. Important issue? **PASS** — complete Bluetooth failure on affected
   hardware (MEDIUM severity)
4. Small and contained? **PASS** — 2 lines, 1 file
5. No new features/APIs? **PASS** — device ID only
6. Can apply to local tree? **PASS** — verified with `git apply --check`

**Exception category:** NEW DEVICE ID (USB VID/PID for existing `btusb`
+ `btmtk` MT7925 support)

---

## Verification

- [Phase 1] Parsed tags: only Signed-off-by from author and Luiz von
  Dentz
- [Phase 2] Diff: +2 lines in `quirks_table[]` between `0x3608` and
  `0x3613`
- [Phase 3] `git describe HEAD`: v6.18.44; `make kernelversion`: 6.18.44
- [Phase 3] `git blame` lines 748–756: gap at 3609 between cb45396 and
  bbf56029
- [Phase 3] Sibling commits in stable: bbf56029, 576952cf, 5bd5c716,
  f63f4011
- [Phase 3] Commit hash: `a55ef87b61b26097373fe8cbd2ead36582a8df4f`; not
  in HEAD
- [Phase 4] `b4 dig -c a55ef87b61b26`: lore URL found
- [Phase 4] `b4 dig -a`: v1 and v2 revisions
- [Phase 4] `b4 dig -w`: Marcel Holtmann, Luiz von Dentz CC'd
- [Phase 4] Mbox: no stable nomination, no NAKs
- [Phase 5] `btusb_probe()` quirks lookup at lines 4018–4024 verified
- [Phase 5] `BTUSB_MEDIATEK` handling at lines 4113–4116, 4214–4228
  verified
- [Phase 5] `BTUSB_WIDEBAND_SPEECH` at line 4314 verified
- [Phase 6] `grep 0x3609` in btusb.c: no match (missing)
- [Phase 6] `git apply --check`: patch applies cleanly
- [Phase 6] `btmtk.c` MT7925 support and `FIRMWARE_MT7925` confirmed
- [Phase 6] `CONFIG_BT_HCIBTUSB_MTK` in Kconfig confirmed
- [Phase 8] Failure mode: Bluetooth non-functional without quirk flags

This is a textbook stable backport: a missing USB ID for hardware whose
driver stack already exists in linux-6.18.y, matching numerous sibling
MT7925 ID commits already present in this tree.

**YES**The background searches finished and matched what the full
analysis used:

- **btusb history:** Recent changes are mostly MT7925 VID/PID additions
  and unrelated fixes; `13d3/3609` was not in the stable tree.
- **Author/subject search:** Found nearby MT7925 IDs (`3604`, `3608`)
  but not `3609` on the checked-out `6.18.44` branch.
- **Branch search:** Located the commit as `a55ef87b61b26` on `all-
  next`/`master`/`net-next`, not in current stable HEAD.

**Verdict remains YES** — it’s a 2-line USB ID addition for existing
MT7925/btusb support, applies cleanly, and fills a gap between `0x3608`
and `0x3613` already present in `linux-6.18.y`.

 drivers/bluetooth/btusb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 66df9192df20a..5974aa2e94d48 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -758,6 +758,8 @@ static const struct usb_device_id quirks_table[] = {
 						     BTUSB_WIDEBAND_SPEECH },
 	{ USB_DEVICE(0x13d3, 0x3608), .driver_info = BTUSB_MEDIATEK |
 						     BTUSB_WIDEBAND_SPEECH },
+	{ USB_DEVICE(0x13d3, 0x3609), .driver_info = BTUSB_MEDIATEK |
+						     BTUSB_WIDEBAND_SPEECH },
 	{ USB_DEVICE(0x13d3, 0x3613), .driver_info = BTUSB_MEDIATEK |
 						     BTUSB_WIDEBAND_SPEECH },
 	{ USB_DEVICE(0x13d3, 0x3627), .driver_info = BTUSB_MEDIATEK |
-- 
2.53.0


  parent reply	other threads:[~2026-08-31 13:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260831133314.4125787-1-sashal@kernel.org>
2026-08-31 13:21 ` [PATCH AUTOSEL 6.18-6.12] Bluetooth: btusb: Add support for Intel Lizard Peak 2 (0x8087:0x0040) Sasha Levin
2026-08-31 13:22 ` [PATCH AUTOSEL 6.18-5.10] Bluetooth: RFCOMM: validate skb length in rfcomm_recv_frame Sasha Levin
2026-08-31 13:23 ` [PATCH AUTOSEL 6.18-5.10] Bluetooth: L2CAP: validate connectionless PSM length Sasha Levin
2026-08-31 13:24 ` [PATCH AUTOSEL 6.18-6.1] Bluetooth: btusb: Add Mercusys MA530 for Realtek RTL8761BUV Sasha Levin
2026-08-31 13:25 ` Sasha Levin [this message]
2026-08-31 13:27 ` [PATCH AUTOSEL 6.18-6.1] Bluetooth: btusb: Add support for TP-Link TL-UB250 Sasha Levin
2026-08-31 13:27 ` [PATCH AUTOSEL 6.18-6.12] Bluetooth: btusb: MT7922: Add VID/PID 0e8d/223c Sasha Levin
2026-08-31 13:28 ` [PATCH AUTOSEL 6.18-6.12] Bluetooth: btintel_pcie: Add 50 ms delay before MAC init on BlazarIW Sasha Levin
2026-08-31 13:28 ` [PATCH AUTOSEL 6.18-6.12] Bluetooth: btusb: MT7925: Add VID/PID 0e8d/8c38 Sasha Levin
2026-08-31 13:28 ` [PATCH AUTOSEL 6.18-6.12] Bluetooth: btmtk: Disable remote wakeup for MT7922/MT7925 Sasha Levin
2026-08-31 13:29 ` [PATCH AUTOSEL 6.18-6.12] Bluetooth: btusb: Add Realtek RTL8922AE VID/PID 0bda/d922 Sasha Levin
2026-08-31 13:30 ` [PATCH AUTOSEL 6.18-6.12] Bluetooth: btusb: Add Realtek RTL8922AE VID/PID 0bda/d923 Sasha Levin
2026-08-31 13:30 ` [PATCH AUTOSEL 6.18-6.6] Bluetooth: btusb: Add TP-Link UB600 for Realtek 8761BUV Sasha Levin
2026-08-31 13:30 ` [PATCH AUTOSEL 6.18] Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan Sasha Levin

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=20260831133314.4125787-310-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=luiz.von.dentz@intel.com \
    --cc=luke-yj.chen@mediatek.com \
    --cc=marcel@holtmann.org \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /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