Linux bluetooth development
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 222376] New: btmtk: MT6639 (MT7927) BT wedged after warm reboot from Windows; ACPI _PRR reset recovers it
Date: Thu, 03 Dec 2026 20:25:55 +0000	[thread overview]
Message-ID: <bug-222376-62941@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=222376

            Bug ID: 222376
           Summary: btmtk: MT6639 (MT7927) BT wedged after warm reboot
                    from Windows; ACPI _PRR reset recovers it
           Product: Drivers
           Version: 2.5
    Kernel Version: 7.3.7-2-cachyos
          Hardware: AMD
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Bluetooth
          Assignee: linux-bluetooth@vger.kernel.org
          Reporter: bugzilla@accelocom.com
        Regression: No

After a warm restart from Windows 11, the MT6639 Bluetooth part of an
MT7927 card sometimes crashes during btusb setup and cannot be recovered
by any reset the driver has. The chip drops off USB until the machine is
powered off. Cold boots always work.

The laptop's ACPI tables give the chip's USB port a _PRR power resource
whose _RST pulses the chip's reset line. Calling that _RST brings a
wedged chip back at once, and calling it before btusb loads has
prevented the failure on every start since. I'd like to suggest that
btmtk use _PRR the way btintel_acpi_reset_method() does.

Hardware / software
-------------------
- ASUS ROG Zephyrus G14 GA402XY, BIOS GA402XY.318 (AMD)
- MT7927 card (replacement for the factory MediaTek card): Wi-Fi via
  mt7925e (PCI 14c3:7927), BT via btusb (USB 0e8d:6639, usb 1-5)
- Kernel 7.3.7-2-cachyos (failures also seen on 7.3.6-2 and 7.3.6-3)
- mediatek/mt7927/BT_RAM_CODE_MT6639_2_1_hdr.bin, Build Time 20260611041233
- Dual boot with Windows 11 (vendor driver)

Failure
-------
Restart Windows, boot Linux. It happens intermittently (2026-11-26,
2026-11-30, 2026-12-03), only right after Windows. Log from 2026-12-03:

[  2.799039] usbcore: registered new interface driver btusb
[  6.600075] Bluetooth: hci0: Mediatek coredump end
[ 13.348059] Bluetooth: hci0: Execution of wmt command timed out
[ 13.348173] Bluetooth: hci0: Failed to send wmt func ctrl (-110)
[ 18.468307] Bluetooth: hci0: Failed to read uhw reg(-110)
[ 18.587018] usb 1-5: reset high-speed USB device number 3 using xhci_hcd
[ 23.701014] usb 1-5: device descriptor read/64, error -110
...
[ 72.436080] usb 1-5: device not accepting address 3, error -62
[ 83.701085] usb 1-5: USB disconnect, device number 3
...
[126.716127] usb usb1-port5: attempt power cycle
[137.972289] usb 1-5: device not accepting address 6, error -62
[149.236465] usb usb1-port5: unable to enumerate USB device

The register-based subsystem reset cannot run (uhw reads time out), the
USB port reset and the hub port power cycle both fail, and the WMT
timeout reset from "Bluetooth: mt7925: trigger reset on WMT timeout" is
gated to dev_id 0x7925. While this runs, the built-in keyboard on the
same xHCI controller (0000:65:00.3) stops responding.

ACPI reset
----------
The btusb interfaces' ACPI companion is the port the chip sits on:

  /sys/bus/usb/devices/1-5:1.0/firmware_node/path:
  \_SB_.PCI0.GP17.XHC0.RHUB.PRT5

An SSDT (OEM Table ID "CPMWLRC", AMD CPM) gives PRT5 a _PRR returning
\_SB.PRWB, whose _RST drives a GPIO low, waits, drives it high, and
sleeps 100 ms. The Wi-Fi function (\_SB.PCI0.GPP6.WLAN) has its own _PRR,
\_SB.PRWL.

On the wedged chip above, 25 minutes later, calling \_SB.PRWB._RST
(through the acpi_call module) brought it straight back:

[1634.174012] usb 1-5: new high-speed USB device number 8 using xhci_hcd
[1634.318017] Bluetooth: hci0: Loading BT firmware:
mediatek/mt7927/BT_RAM_CODE_MT6639_2_1_hdr.bin
[1636.134028] Bluetooth: hci0: Device setup in 1784878 usecs

Since then, a boot service calls _RST, waits for the chip to come back
on USB, and only then loads btusb. Every start since has been clean: two
after a Windows restart and one after a Windows shutdown. The reset adds
about 0.6 s. Windows Bluetooth also works after both a Linux restart and
a Linux shutdown. That is only three starts after Windows, but
the recovery above is direct evidence that _RST reaches the chip when
nothing else does.

Suggestions
-----------
1. Recovery: when MT79xx/MT6639 setup fails (WMT timeout, or uhw
   register access fails), and the interface's ACPI companion has a
   _PRR, evaluate its _RST as btintel_acpi_reset_method() does, before
   or instead of the USB-level resets that cannot reach a wedged chip.
2. Remove the dev_id == 0x7925 check on the "wmt func ctrl" timeout in
   btmtk_usb_setup(), so MT6639 also triggers a reset there.
3. Prevention (optional): pulse _RST once at the first probe after boot,
   before downloading firmware, so a firmware state left by another OS
   is never reused. If the chip already reports the patch as loaded
   (BTMTK_WMT_PATCH_DONE) on a fresh boot, the download is skipped, which
   may be how the Windows state survives. This costs a re-enumeration,
   so it would need a once-per-boot guard.

Possibly related: bugs 222164 and 221878 (MT7902: firmware coredump,
then the subsystem reset fails and the chip drops off USB for good).
A _PRR reset might recover those too, where the platform provides one.

I can test patches on this machine, including repeated
Windows-to-Linux restarts, and can collect btmon or dynamic debug output
if a failure recurs.

-- 
You are receiving this mail because:
You are the assignee for the bug.

                 reply	other threads:[~2026-12-03 20:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-222376-62941@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=linux-bluetooth@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