openwrt / openwrt/mt76

AP stop with mt76x2u 1-1.3:1.0: error: mt76x02u_mcu_wait_resp failed with -145

Open
#704 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
888
Forks
436
PR merge metrics
No merged PRs in 30d

Description

Summary

Probably related to this issue. USB adapter is unstable crashing after light sustained load. Created new issues as getting error -145 instead of -110 from the related ticket.

[ 5708.363686] mt76x2u 1-1.3:1.0: error: mt76x02u_mcu_wait_resp failed with -145
Configuration

Hardware: GL.inet GL-E750
USB Adapter: Alfa AWUS036ACM

Linux Kernel

root@pd-gl-e750:~# uname -a
Linux pd-gl-e750 5.10.146 #0 Fri Oct 14 22:44:41 2022 mips GNU/Linux

Firmware Build

root@pd-gl-e750:~# cat /etc/banner
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.2, r19803-9a599fee93
 -----------------------------------------------------

Custom Firmware Packages

ath10k-firmware-qca9887-ct base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-ath10k-ct kmod-ath9k kmod-gpio-button-hotplug kmod-nft-offload kmod-usb2 libc libgcc libustream-wolfssl logd mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail swconfig uboot-envtools uci uclient-fetch urandom-seed urngd wpad-basic-wolfssl kmod-usb-net-asix kmod-usb-storage kmod-mt76x2u kmod-usb-serial kmod-usb-net kmod-usb-serial-wwan kmod-usb-serial-option kmod-usb-net-qmi-wwan modemmanager mwan3 travelmate block-mount kmod-fs-ext4 e2fsprogs fdisk luci luci-ssl luci-proto-modemmanager luci-app-mwan3 luci-app-travelmate lscpu usbutils pciutils

Kernel Modules

root@pd-gl-e750:~# lsmod | grep mt
cfg80211              285808  9 ath9k,ath9k_common,ath10k_core,ath,mt76x2_common,mt76x02_usb,mt76x02_lib,mt76,mac80211
mac80211              523616  6 mt76x2u,ath9k,ath10k_core,mt76x02_usb,mt76x02_lib,mt76
mt76                   44320  5 mt76x2u,mt76x2_common,mt76x02_usb,mt76x02_lib,mt76_usb
mt76_usb               11824  2 mt76x2u,mt76x02_usb
mt76x02_lib            40640  3 mt76x2u,mt76x2_common,mt76x02_usb
mt76x02_usb             5952  1 mt76x2u
mt76x2_common          12192  1 mt76x2u
mt76x2u                10496  0 
usbcore               146464 15 mt76x2u,option,usb_wwan,qmi_wwan,mt76x02_usb,mt76_usb,asix,usbserial,usbnet,cdc_wdm,usb_storage,ehci_platform,ehci_fsl,ehci_hcd

USB information

root@pd-gl-e750:~# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=, Driver=usb-storage, 480M
        |__ Port 2: Dev 5, If 0, Class=, Driver=option, 480M
        |__ Port 2: Dev 5, If 3, Class=, Driver=option, 480M
        |__ Port 2: Dev 5, If 1, Class=, Driver=option, 480M
        |__ Port 2: Dev 5, If 4, Class=, Driver=qmi_wwan, 480M
        |__ Port 2: Dev 5, If 2, Class=, Driver=option, 480M
        |__ Port 3: Dev 6, If 0, Class=, Driver=mt76x2u, 480M

Logs

root@pd-gl-e750:~# dmesg | grep mt
[    1.531468] UBI: auto-attach mtd0
[    1.534936] ubi0: attaching mtd0
[    2.999945] ubi0: attached mtd0 (name "ubi", size 128 MiB)
[   28.938907] mt76x2u 1-1.3:1.0: ASIC revision: 76120044
[   28.991702] mt76x2u 1-1.3:1.0: ROM patch build: 20141115060606a
[   29.183350] mt76x2u 1-1.3:1.0: Firmware Version: 0.0.00
[   29.188768] mt76x2u 1-1.3:1.0: Build: 1
[   29.192778] mt76x2u 1-1.3:1.0: Build Time: 201607111443____
[   30.181487] usbcore: registered new interface driver mt76x2u
[   36.324317] ath10k_pci 0000:00:00.0: firmware ver 10.1-ct-87-__fW-022-ecad3248 api 2 features wmi-10.x,has-wmi-mgmt-tx,mfp,txstatus-noack,wmi-10.x-CT,ratemask-CT,txrate-CT,get-temp-CT,tx-rc-CT,cust-stats-CT,retry-gt2-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT crc32 61a92df5
[ 5705.723744] mt76x2u 1-1.3:1.0: error: mt76x02u_mcu_wait_resp failed with -145
[ 5708.363686] mt76x2u 1-1.3:1.0: error: mt76x02u_mcu_wait_resp failed with -145
[ 5781.046306] mt76x2u 1-1.3:1.0: MAC RX failed to stop
[ 5804.125568] mt76x2u 1-1.3:1.0: MAC RX failed to stop
[ 5807.918942] mt76x2u 1-1.3:1.0: timed out waiting for pending tx
[ 5823.215425] mt76x2u 1-1.3:1.0: MAC RX failed to stop
[ 5887.523547] mt76x2u 1-1.3:1.0: MAC RX failed to stop
[ 5905.643170] mt76x2u 1-1.3:1.0: MAC RX failed to stop
[ 6037.961288] mt76x2u 1-1.3:1.0: MAC RX failed to stop
[ 6056.081286] mt76x2u 1-1.3:1.0: MAC RX failed to stop
Troubleshooting Steps to recover device
Reload kernel module results in same error -145

rmmod mt76x2u with associated dmesg logs

[39861.314326] usbcore: deregistering interface driver mt76x2u

modprobe mt76x2u with associated dmesg logs

[39883.709212] usb 1-1.3: reset high-speed USB device number 4 using ehci-platform
[39883.869665] mt76x2u 1-1.3:1.0: ASIC revision: 76120044
[39883.926200] mt76x2u 1-1.3:1.0: ROM patch build: 20141115060606a
[39885.012350] mt76x2u 1-1.3:1.0: firmware upload failed: -145
[39887.174039] mt76x2u: probe of 1-1.3:1.0 failed with error -5
[39887.180359] usbcore: registered new interface driver mt76x2u
Apply sg disable patch, reload kernel modules and replug adapter

Apply sg disable path per comment

echo 1 > /sys/module/mt76_usb/parameters/disable_usb_sg

Unload kernel module rmmod mt76x2u with associated dmesg logs

[39916.206640] usbcore: deregistering interface driver mt76x2u

Replug adapter and load kernel modulemodprobe mt76x2u with associated dmesg logs

[39922.738512] usb 1-1.3: USB disconnect, device number 4
[39924.828741] usb 1-1.3: new high-speed USB device number 6 using ehci-platform
[39934.398660] usb 1-1.3: reset high-speed USB device number 6 using ehci-platform
[39934.551022] mt76x2u 1-1.3:1.0: ASIC revision: 76120044
[39934.613956] mt76x2u 1-1.3:1.0: ROM patch build: 20141115060606a
[39934.781970] mt76x2u 1-1.3:1.0: Firmware Version: 0.0.00
[39934.787493] mt76x2u 1-1.3:1.0: Build: 1
[39934.791530] mt76x2u 1-1.3:1.0: Build Time: 201607111443____
[39935.715118] ieee80211 phy5: Selected rate control algorithm 'minstrel_ht'
[39935.749301] usbcore: registered new interface driver mt76x2u

The above seems to resolve the issue for now, will check in about stability

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the mt76x02u_mcu_wait_resp errors and the mt76_usb disable_usb_sg parameter described in the report. Reproduce the failure using the listed GL-E750, AWUS036ACM, kernel, firmware, and dmesg details, then compare behavior after reloading the module and replugging the adapter. Done means the cause of the -145 failure is identified and the adapter remains stable without relying on the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
embedded-iot, networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.