mt7921u AP outage on Raspberry Pi 4 after MCU timeout despite USB recovery series

Open
#1,141 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
c, linux, raspberry-pi

Research direction

Start by reviewing the mt7921_mac_reset_work, mt792xu_reset_on_bus_error, mt76u_stop_tx, and kthread_park paths, along with the listed upstream recovery commits and the attached diagnostic log. Reproduce the long-running 5 GHz AP failure if possible and determine whether recovery reliably restores the AP without the kthread_park warning.

Written by the indexing model from the issue text.

Description

Summary

I can reproduce recurring MT7921U outages on a Raspberry Pi 4 when the
adapter operates as a 5 GHz access point over USB 3.0.

The failure matches raspberrypi/linux#5193: the firmware stops responding,
the driver reports an MCU timeout and then triggers a warning in
kthread_park() through the mt76u_stop_tx() reset path.

Environment
  • Board: Raspberry Pi 4 Model B Rev 1.5
  • Adapter: MediaTek MT7921U, USB ID 0e8d:7961
  • Kernel: 6.18.50+rpt-rpi-v8
  • Firmware package: firmware-mediatek 1:20260519-1~bpo13+1+rpt1
  • Loaded firmware: ____010000-20260224110949
  • USB link: SuperSpeed, 5000M
  • AP mode: 5 GHz, channel 36, VHT80
  • mt76_usb disable_usb_sg=Y
  • USB runtime power management disabled with power/control=on
Recovery patches tested

I backported the following upstream mt76 MT7921U USB recovery commits:

  • d23353688dd0
  • 161596f033e8
  • e137e5fd245c
  • a4803d1801c7
  • b994cb409f21
  • 7910bd565d8b

The backport also includes the follow-up bus_hung correction equivalent
to commit a7160a4.

The patched modules are loaded from:

/lib/modules/6.18.50+rpt-rpi-v8/updates/sbrouter-mt7921u/

The mt792xu_reset_on_bus_error symbol is present in the loaded module.

Actual behavior

After running normally for an extended period, all clients disconnect and
the access point temporarily disappears.

The kernel reports:

mt7921u 2-2:1.0: Message 00020003 (seq 13) timeout
mt7921u 2-2:1.0: timed out waiting for pending tx
WARNING: CPU: 2 PID: 5309 at kernel/kthread.c:709 kthread_park+0xb4/0xe0
Workqueue: mt76 mt7921_mac_reset_work [mt7921_common]
kthread_park
mt76u_stop_tx
mt7921u_mac_reset
mt7921_mac_reset_work

I did not observe the USB transport access failed message. It appears
that the USB control-path check still succeeded, so
mt792xu_reset_on_bus_error() did not escalate this particular failure
to usb_queue_reset_device().

The firmware was reloaded and a station associated again approximately
14 seconds later. In some previous occurrences, manual USB driver
unbind/bind was required to restore the AP.

hostapd remained active while the wireless interface stopped operating.

Expected behavior

The adapter should remain operational in AP mode. If the firmware becomes
unresponsive, the recovery path should reset the device without triggering
the kthread_park() warning and restore the AP reliably.

Reproduction

There is no short deterministic reproducer yet. The failure occurs during
normal long-running AP operation with multiple clients, usually after
hours or days.

A complete sanitized diagnostic log is attached:
mt7921u-failure-20260928.txt

Dominant language
C
Stars
895
Forks
461
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openwrt/mt76

All issues in openwrt/mt76

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.