Bug 219040 - MT7961 Bluetooth crashes device
Summary: MT7961 Bluetooth crashes device
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: AMD Linux
: P3 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-14 13:19 UTC by Michael
Modified: 2024-09-17 16:55 UTC (History)
1 user (show)

See Also:
Kernel Version: >= 6.6
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Michael 2024-07-14 13:19:06 UTC
Bluetooth driver/firmware crashes AWUS036AXML WiFi functions on AMD mainboard MSI B550-APro.

Steps to reproduce:
Plug an ALFA AWUS036AXML to an USB connector of an AMD AM4 mainboard and check dmesg. Neither BT nor WiFi is working because device or device crashes.

[21520.891898] usbcore: registered new interface driver mt7921u
[21520.893777] usb 5-2.3: USB disconnect, device number 7
[21523.366017] usb 5-2.3: new high-speed USB device number 8 using xhci_hcd
[21523.462775] usb 5-2.3: New USB device found, idVendor=0e8d, idProduct=7961, bcdDevice= 1.00
[21523.462782] usb 5-2.3: New USB device strings: Mfr=6, Product=7, SerialNumber=8
[21523.462784] usb 5-2.3: Product: Wireless_Device
[21523.462785] usb 5-2.3: Manufacturer: MediaTek Inc.
[21523.462787] usb 5-2.3: SerialNumber: 000000000
[21523.652233] Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20240219111427
[21526.429034] Bluetooth: hci0: Device setup in 2714588 usecs
[21526.429042] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[21528.532712] Bluetooth: hci0: Opcode 0x0c03 failed: -110
[21530.666039] Bluetooth: hci0: Failed to read MSFT supported features (-110)
[21532.799343] Bluetooth: hci0: AOSP get vendor capabilities (-110)
[21532.895532] usb 5-2.3: reset high-speed USB device number 8 using xhci_hcd
[21537.992843] usb 5-2.3: device descriptor read/64, error -110
[21553.565987] usb 5-2.3: device descriptor read/64, error -110
[21553.749338] usb 5-2.3: reset high-speed USB device number 8 using xhci_hcd
[21558.899412] usb 5-2.3: device descriptor read/64, error -110

Remove BT firmware
BT_RAM_CODE_MT7961_1_2_hdr.bin.zst

Check dmesg again. WiFi part of the device is working, now.

[21657.726728] usb 5-2.3: new high-speed USB device number 11 using xhci_hcd
[21657.822424] usb 5-2.3: New USB device found, idVendor=0e8d, idProduct=7961, bcdDevice= 1.00
[21657.822432] usb 5-2.3: New USB device strings: Mfr=6, Product=7, SerialNumber=8
[21657.822435] usb 5-2.3: Product: Wireless_Device
[21657.822437] usb 5-2.3: Manufacturer: MediaTek Inc.
[21657.822440] usb 5-2.3: SerialNumber: 000000000
[21658.018464] bluetooth hci0: Direct firmware load for mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin failed with error -2
[21658.018471] Bluetooth: hci0: Failed to load firmware file (-2)
[21658.018475] Bluetooth: hci0: Failed to set up firmware (-2)
[21658.018477] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[21658.111154] usb 5-2.3: reset high-speed USB device number 11 using xhci_hcd
[21658.241079] bluetooth hci0: Direct firmware load for mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin failed with error -2
[21658.241084] Bluetooth: hci0: Failed to load firmware file (-2)
[21658.241087] Bluetooth: hci0: Failed to set up firmware (-2)
[21658.241090] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[21658.288540] mt7921u 5-2.3:1.3: HW/SW Version: 0x8a108a10, Build Time: 20240219110958a

[21658.548973] mt7921u 5-2.3:1.3: WM Firmware Version: ____010000, Build Time: 20240219111038
[21660.150659] mt7921u 5-2.3:1.3 wlp48s0f4u2u3i3: renamed from wlan0

I'm not sure if it is related to the firmware or the driver.

The bug does not appear on Intel mainboards.
Comment 1 Michael 2024-07-14 13:36:49 UTC
Another workaround is to prevent that btusb will be loaded:
echo "install btusb /bin/false" >> /etc/modprobe.d/local-dontload.conf
Comment 2 Artem S. Tashkinov 2024-07-17 08:29:18 UTC
Are you running the latest version of BIOS?
Comment 3 Michael 2024-07-17 09:18:02 UTC
Yes, I'm running the latest available BIOS.
Comment 4 Michael 2024-07-17 09:18:53 UTC
It is definitely the BT part of the driver that caused the crash.
Comment 5 Michael 2024-07-17 09:25:01 UTC
And I'm not the only one running into this problem:
https://www.reddit.com/r/Kalilinux/comments/14h198n/awus036axml_network_card_inaccessible_in_kali_via/
Comment 6 Michael 2024-07-17 09:34:26 UTC
I forgot to mention:
I'm running Arch Linux, systemd-boot with
6.9.9.arch1-1 (Arch Linux kernel)
6.6.40-1 (Arch Linux LTS kernel)
and a custom kernel 6.10 (https://www.kernel.org/)
Comment 7 Michael 2024-07-17 09:49:28 UTC
I have this device since November 2023:
https://github.com/ZerBea/hcxdumptool/discussions/361#discussioncomment-7567045

and I suspect that BT in combination with WiFi has never worked:
https://github.com/morrownr/USB-WiFi/issues/378
Comment 8 Michael 2024-07-17 10:08:52 UTC
And of course, it has been reported on Arch Forum, too:
https://bbs.archlinux.org/viewtopic.php?id=292420
Comment 9 Michael 2024-08-02 15:30:54 UTC
Running kernel 6.11-rc1, the situation changed.
Immediately after the adapter has been plugged in the driver dies.

[   37.210532] usb 1-3: new high-speed USB device number 4 using xhci_hcd
[   37.356975] usb 1-3: New USB device found, idVendor=0e8d, idProduct=7961, bcdDevice= 1.00
[   37.356990] usb 1-3: New USB device strings: Mfr=6, Product=7, SerialNumber=8
[   37.356996] usb 1-3: Product: Wireless_Device
[   37.357002] usb 1-3: Manufacturer: MediaTek Inc.
[   37.357007] usb 1-3: SerialNumber: 000000000
[   37.432271] Bluetooth: hci1: HW/SW Version: 0x008a008a, Build Time: 20240219111427
[   42.383409] Bluetooth: hci1: command 0xfd98 tx timeout
[   42.383442] Bluetooth: hci1: failed to reset (-19)
[   42.383453] Bluetooth: hci1: Failed to apply iso setting (-110)
[   42.383469] Bluetooth: hci1: Device setup in 4889094 usecs
[   42.383478] Bluetooth: hci1: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[   44.513829] Bluetooth: hci1: Opcode 0x0c03 failed: -110
[   46.647139] Bluetooth: hci1: Failed to read MSFT supported features (-110)
[   48.780464] Bluetooth: hci1: AOSP get vendor capabilities (-110)
[   48.781196] Oops: general protection fault, probably for non-canonical address 0xdead000000000122: 0000 [#1] PREEMPT SMP NOPTI
[   48.781213] CPU: 7 UID: 0 PID: 992 Comm: (udev-worker) Not tainted 6.11.0-rc1-1-git-00154-gc0ecd6388360 #2 b1cf9419ed4796d1c851e78f392f95aca750ec44
[   48.781229] Hardware name: ASUSTeK COMPUTER INC. TUF Gaming FX505DT_FX505DT/FX505DT, BIOS FX505DT.316 01/28/2021
[   48.781237] RIP: 0010:hci_unregister_dev+0x45/0x1f0 [bluetooth]
[   48.781353] Code: 89 ef e8 2e f3 60 f3 f0 80 8b e9 0e 00 00 08 48 89 ef e8 8e e0 60 f3 48 c7 c7 68 90 8d c1 e8 a2 41 61 f3 48 8b 43 08 48 8b 13 <48> 3b 18 0f 85 f5 c7 06 00 48 3b 5a 08 0f 85 eb c7 06 00 48 89 42
[   48.781362] RSP: 0018:ffffa4ff03b6b880 EFLAGS: 00010246
[   48.781374] RAX: dead000000000122 RBX: ffff8fbc99272000 RCX: 0000000000000000
[   48.781382] RDX: dead000000000100 RSI: ffff8fbc84fbb1d0 RDI: ffffffffc18d9068
[   48.781390] RBP: ffff8fbc992724d0 R08: ffff8fbcb0378d80 R09: 0000000080150004
[   48.781397] R10: 0000000080150004 R11: 0000000000000001 R12: ffff8fbc99272000
[   48.781405] R13: ffffffffc195e278 R14: ffffffffc195e278 R15: ffff8fbcc4004c50
[   48.781414] FS:  00007f8f234d0880(0000) GS:ffff8fbdaef80000(0000) knlGS:0000000000000000
[   48.781424] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   48.781432] CR2: 00007f8a57304168 CR3: 0000000138576000 CR4: 00000000003506f0
[   48.781441] Call Trace:
[   48.781448]  <TASK>
[   48.781456]  ? __die_body.cold+0x19/0x27
[   48.781472]  ? die_addr+0x3c/0x60
[   48.781486]  ? exc_general_protection+0x17d/0x400
[   48.781508]  ? asm_exc_general_protection+0x26/0x30
[   48.781533]  ? hci_unregister_dev+0x45/0x1f0 [bluetooth 8a9cc3af51c1afc3375b2ad327d32ba115ddd9b5]
[   48.781639]  btusb_disconnect+0x67/0x170 [btusb ddaaa0f099caea679dbe7e06f60069735b834ce8]
[   48.781665]  usb_unbind_interface+0x93/0x290
[   48.781687]  device_release_driver_internal+0x19c/0x200
[   48.781707]  usb_forced_unbind_intf+0x75/0xb0
[   48.781723]  usb_reset_device+0xe8/0x290
[   48.781745]  mt7921u_probe+0xab/0x230 [mt7921u 501e9d6030eccb9968f5d7225803df60adbb1df3]
[   48.781768]  usb_probe_interface+0xe8/0x2b0
[   48.781785]  really_probe+0xde/0x340
[   48.781800]  ? pm_runtime_barrier+0x54/0x90
[   48.781817]  ? __pfx___driver_attach+0x10/0x10
[   48.781832]  __driver_probe_device+0x78/0x110
[   48.781848]  driver_probe_device+0x1f/0xa0
[   48.781864]  __driver_attach+0xba/0x1c0
[   48.781880]  bus_for_each_dev+0x8f/0xe0
[   48.781898]  bus_add_driver+0x112/0x1f0
[   48.781916]  driver_register+0x72/0xd0
[   48.781930]  usb_register_driver+0x8c/0x130
[   48.781944]  ? __pfx_mt7921u_driver_init+0x10/0x10 [mt7921u 501e9d6030eccb9968f5d7225803df60adbb1df3]
[   48.781962]  do_one_initcall+0x5b/0x310
[   48.781989]  do_init_module+0x60/0x230
[   48.782007]  init_module_from_file+0x89/0xe0
[   48.782038]  idempotent_init_module+0x121/0x2b0
[   48.782064]  __x64_sys_finit_module+0x5e/0xb0
[   48.782081]  do_syscall_64+0x82/0x190
[   48.782095]  ? srso_return_thunk+0x5/0x5f
[   48.782116]  ? syscall_exit_to_user_mode+0x10/0x200
[   48.782131]  ? srso_return_thunk+0x5/0x5f
[   48.782146]  ? do_syscall_64+0x8e/0x190
[   48.782157]  ? srso_return_thunk+0x5/0x5f
[   48.782170]  ? vfs_read+0x159/0x370
[   48.782184]  ? srso_return_thunk+0x5/0x5f
[   48.782197]  ? __rseq_handle_notify_resume+0xa6/0x4c0
[   48.782220]  ? srso_return_thunk+0x5/0x5f
[   48.782232]  ? switch_fpu_return+0x4e/0xd0
[   48.782246]  ? srso_return_thunk+0x5/0x5f
[   48.782258]  ? syscall_exit_to_user_mode+0x14d/0x200
[   48.782272]  ? srso_return_thunk+0x5/0x5f
[   48.782284]  ? do_syscall_64+0x8e/0x190
[   48.782304]  ? srso_return_thunk+0x5/0x5f
[   48.782317]  ? syscall_exit_to_user_mode+0x10/0x200
[   48.782330]  ? srso_return_thunk+0x5/0x5f
[   48.782343]  ? do_syscall_64+0x8e/0x190
[   48.782353]  ? exc_page_fault+0x81/0x190
[   48.782368]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[   48.782382] RIP: 0033:0x7f8f237261fd
[   48.782414] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e3 fa 0c 00 f7 d8 64 89 01 48
[   48.782424] RSP: 002b:00007ffd43c580e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   48.782438] RAX: ffffffffffffffda RBX: 000055f1827c3c80 RCX: 00007f8f237261fd
[   48.782446] RDX: 0000000000000004 RSI: 00007f8f22ff2376 RDI: 000000000000001b
[   48.782455] RBP: 00007f8f22ff2376 R08: 000055f4dd616fdc R09: 00007ffd43c58130
[   48.782463] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000
[   48.782471] R13: 000055f1827a9840 R14: 0000000000000000 R15: 000055f18288cba0
[   48.782495]  </TASK>
[   48.782502] Modules linked in: mt7921u(+) mt792x_usb mt7921_common mt792x_lib mt76_connac_lib mt76_usb mt76 snd_seq_dummy snd_hrtimer snd_seq snd_seq_device intel_rapl_msr amd_atl vfat intel_rapl_common fat snd_hda_codec_realtek snd_hda_codec_generic snd_hda_scodec_component snd_hda_codec_hdmi rtw88_8821ce rtw88_8821c rtw88_pci snd_hda_intel snd_intel_dspcfg crct10dif_pclmul rtw88_core snd_intel_sdw_acpi crc32_pclmul joydev polyval_clmulni snd_hda_codec polyval_generic uvcvideo ghash_clmulni_intel mac80211 snd_hda_core btusb videobuf2_vmalloc sha512_ssse3 snd_hwdep uvc btrtl sha256_ssse3 videobuf2_memops libarc4 btintel sha1_ssse3 snd_pcm ee1004 btbcm videobuf2_v4l2 aesni_intel asus_nb_wmi btmtk r8169 videodev sp5100_tco gf128mul snd_timer asus_wmi realtek crypto_simd cfg80211 bluetooth snd videobuf2_common hid_multitouch i2c_piix4 platform_profile mdio_devres cryptd rapl sparse_keymap wmi_bmof pcspkr acpi_cpufreq mc k10temp i2c_smbus ccp rfkill soundcore libphy mousedev i2c_hid_acpi i2c_hid asus_wireless mac_hid sg
[   48.782808]  crypto_user loop dm_mod nfnetlink ip_tables x_tables ext4 crc32c_generic mbcache jbd2 hid_generic usbhid amdgpu amdxcp i2c_algo_bit drm_ttm_helper ttm serio_raw drm_exec atkbd gpu_sched libps2 drm_suballoc_helper vivaldi_fmap nvme drm_buddy crc32c_intel drm_display_helper nvme_core xhci_pci video crc16 xhci_pci_renesas i8042 nvme_auth wmi serio
[   48.782953] ---[ end trace 0000000000000000 ]---
[   48.782961] RIP: 0010:hci_unregister_dev+0x45/0x1f0 [bluetooth]
[   48.783081] Code: 89 ef e8 2e f3 60 f3 f0 80 8b e9 0e 00 00 08 48 89 ef e8 8e e0 60 f3 48 c7 c7 68 90 8d c1 e8 a2 41 61 f3 48 8b 43 08 48 8b 13 <48> 3b 18 0f 85 f5 c7 06 00 48 3b 5a 08 0f 85 eb c7 06 00 48 89 42
[   48.783091] RSP: 0018:ffffa4ff03b6b880 EFLAGS: 00010246
[   48.783103] RAX: dead000000000122 RBX: ffff8fbc99272000 RCX: 0000000000000000
[   48.783112] RDX: dead000000000100 RSI: ffff8fbc84fbb1d0 RDI: ffffffffc18d9068
[   48.783120] RBP: ffff8fbc992724d0 R08: ffff8fbcb0378d80 R09: 0000000080150004
[   48.783128] R10: 0000000080150004 R11: 0000000000000001 R12: ffff8fbc99272000
[   48.783136] R13: ffffffffc195e278 R14: ffffffffc195e278 R15: ffff8fbcc4004c50
[   48.783145] FS:  00007f8f234d0880(0000) GS:ffff8fbdaef80000(0000) knlGS:0000000000000000
[   48.783156] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   48.783165] CR2: 00007f8a57304168 CR3: 0000000138576000 CR4: 00000000003506f0
Comment 10 Michael 2024-08-03 06:50:49 UTC
I set importance to high, because the crash mentioned in comment 9 has an impact on the entire USB system of my AMD systems:
USB stops responding e.g to USB sticks
dmesg stops responding
Comment 11 Artem S. Tashkinov 2024-08-03 16:34:09 UTC
(In reply to Michael from comment #10)
> I set importance to high, because the crash mentioned in comment 9 has an
> impact on the entire USB system of my AMD systems:
> USB stops responding e.g to USB sticks
> dmesg stops responding

The Linux kernel is not some commercial project and you're not a paying customer to expect that "importance" plays any role in this bug tracker.

What matters is whether the respective developers are aware of this bug report and whether they have the time and resources to fix it.
Comment 12 Michael 2024-08-03 16:49:54 UTC
Thanks for that information.
I know that mostly the developers don't read this reports here. But several user do that.
I got several issue reports on my git hub, which are caused by the kernel or its drivers. Mostly none of them is related to my project:
https://github.com/ZerBea/hcxdumptool

I now see 2 ways:

1) Collect this reports. Confirm the issue. If needed do a bisect and report them here.

2) Or tell the users every man for himself should it report here on bugzilla.

Please let me know which is the better way.
Comment 13 Michael 2024-08-03 16:57:47 UTC
I misunderstood the meaning of "importance" and feel sorry for that:
I thought: If I plug in a device and my entire USB subsystem crashed it could be an important issue.
That is not the case, so I set it to default.
Comment 14 STRSHR 2024-09-17 16:55:22 UTC
(In reply to Artem S. Tashkinov from comment #11)
> (In reply to Michael from comment #10)
> > I set importance to high, because the crash mentioned in comment 9 has an
> > impact on the entire USB system of my AMD systems:
> > USB stops responding e.g to USB sticks
> > dmesg stops responding
> 
> The Linux kernel is not some commercial project and you're not a paying
> customer to expect that "importance" plays any role in this bug tracker.
> 
> What matters is whether the respective developers are aware of this bug
> report and whether they have the time and resources to fix it.

Hello Artem. Could you, please, suggest where would be the appropriate place to raise such bug reports, so you don't get triggered like that? I don't see anything inappropriate in Mike's comments in this thread, which deserves such a response. If you're having a bad day, accept my condolences and take your rage somewhere else. If this bug tracker is just for "paying customers" just close it down for the general public and live in peace.

Note You need to log in before you can comment on or make changes to this bug.