-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Raspberry Pi 4: USB Wifi Adapter Hangs #5193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please post the full output of |
This issue reproduces on a fresh boot for which only the CF-953AX adapter was connected:
|
A suggestion, maybe ping morrownr, here on Github, he has extensive experience with some of the mt7921 based devices. |
Your listing has bMaxBurst=0 for all of the endpoints in any of the configurations / alternate settings. So the burst OUT bug, and the corresponding fix, doesn't apply. If the crash happens only under heavy load, then it's possible the wifi adapter momentarily exceeds the 1.2A downstream port current limit. Does it still happen if plugged into a self-powered USB3.0 hub? |
I have the same crash happening even if plugged into a self-powered USB3.0 hub on two different Pi 4 running latest 6.1.21-v8+ kernel and 64-bit Raspbian. This happens when both plugged on USB3 or USB2 port and doesn't need the adapter to be in AP mode. |
Same thing happens on an Orange Pi 5 Plus with Openwrt running in a Proxmox VM: [ 332.940838] mt7921u 4-1:1.0: Message 00020003 (seq 7) timeout root@OpenWrt:/# uname -a |
Describe the bug
With USB Wifi devices including the CF-953AX (mt7921au) random hangs can occur when used with RPi. The hangs occur under heavy load, for example when operating the device as access point and running a speedtest + in parallel downloading many small files on a client [1]. This suggests further unmitigated firmware bugs in the the RPi USB Host Controller VL805. Disabling USB scatter gather via
/sys/module/mt76_usb/parameters/disable_usb_sg
appears to reduce the frequency of the issue, but the issue can still be reproduced with scatter gather disabled.The issue has also been discussed at openwrt/mt76#405 (for mt7612u devices) and morrownr/USB-WiFi#107 (comment) (for mt7921au devices)
Steps to reproduce the behaviour
ping -i 0.2 google.com
on the client.sudo systemctl restart hostapd@wlxe0e1a934a6a9
)Optional: Disable USB Scatter Gather for the Mediatek USB Adapters. (The error can still be reproduced, but appear to occur less frequently)
Device (s)
Raspberry Pi 4 Mod. B
System
Raspberry Pi reference 2021-05-07
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, dcfd74d7d1fa293065ac6d565711e9ff891fe2b8, stage2
Firmware:
Aug 26 2022 14:03:16
Copyright (c) 2012 Broadcom
version 102f1e848393c2112206fadffaaf86db04e98326 (clean) (release) (start)
Kernel: Linux raspberrypi 6.0.0-rc7-v8+ #4 SMP PREEMPT Wed Sep 28 02:12:59 UTC 2022 aarch64 GNU/Linux
built from rpi-6.0.y 3fb5ca8 which includes the #5173 USB fixes. (This issue also happened with earlier kernels that did not include the #5173 fixes)
Logs
Additional context
At #5173 (comment) @dobo90 suggested that the issue may be addressed by 3157603 That commit forces max_burst = 0 if a USB_CLASS_MASS_STORAGE device is present on a hub (which should include the root_hub, and thus all usb devices plugged into the RPi4?). I'm able to reproduce firmware crashes on CF-953AX on 6.0.0-rc7-v8+ which includes the current fix, both in the case when a USB_CLASS_MASS_STORAGE device is present during boot and remains present, as well as if no USB_CLASS_MASS_STORAGE device is present during boot or at any time.
Boot without a USB_CLASS_MASS_STORAGE (in which case the "fix" is disabled):
and with a USB_CLASS_MASS_STORAGE present (in which case the "fix" is enabled)
Those are both with
/sys/module/mt76_usb/parameters/disable_usb_sg=N
.[1]: Access Point Configuration
The text was updated successfully, but these errors were encountered: