Raspberry Pi 4: USB disconnect causes failure on other USB devices
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c, linux
- Domain
- embedded-iot, operating-systems
Research direction
Start by reproducing the setup with a Raspberry Pi 4, Mass Storage device, and mt7921au wireless device while generating traffic. Read the xhci_hcd and mt7921u failure sequence in the supplied kernel logs; done means identifying why one USB disconnect disrupts the other device and verifying the fix with the same unplugging test.
Written by the indexing model from the issue text.
Description
Describe the bug
With a Mass Storage and a Wireless device (mt7921au CF-953AX) connected to the two USB-3 ports of the Raspberry Pi 4, unplugging the mass storage device triggers internal errors in the kernel mt7921au driver and in the Wireless device's firmware causing the wireless device firmware to reset, indicating that the unplugging of one device interfered with the transmission of messages to the other device.
Steps to reproduce the behaviour
With both devices plugged in, run a speedtest (or otherwise generate traffic) and plug out the Mass Storage device. Observe the failures of the Wireless device.
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 https://github.com/raspberrypi/linux/commit/3fb5ca89c844eb9fda924a5e76ffab9e8c068675 which includes the https://github.com/raspberrypi/linux/pull/5173 USB fixes. (This issue also happened with earlier kernels that did not include the #5173 fixes)
Logs
[ 347.921685] usb 2-2: USB disconnect, device number 3
[ 347.957699] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 348.173668] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=DRIVER_OK
[ 348.653651] usb 2-1: USB disconnect, device number 2
[ 348.682609] wlxe0e1a934a6a9: failed to remove key (0, 8c:fd:f0:4f:4f:1c) from hardware (-19)
[ 348.688160] wlxe0e1a934a6a9: failed to remove key (0, 2c:71:ff:8e:bd:7f) from hardware (-19)
[ 348.695264] wlxe0e1a934a6a9: failed to remove key (0, 94:3a:91:52:e8:11) from hardware (-19)
[ 348.700769] wlxe0e1a934a6a9: failed to remove key (0, 2c:71:ff:ae:dc:cc) from hardware (-19)
[ 348.706256] wlxe0e1a934a6a9: failed to remove key (1, ff:ff:ff:ff:ff:ff) from hardware (-19)
[ 349.661627] mt7921u 2-1:1.3: timed out waiting for pending tx
[ 350.009917] usb 2-1: new SuperSpeed USB device number 4 using xhci_hcd
[ 350.032007] usb 2-1: New USB device found, idVendor=0e8d, idProduct=7961, bcdDevice= 1.00
[ 350.032026] usb 2-1: New USB device strings: Mfr=6, Product=7, SerialNumber=8
[ 350.032033] usb 2-1: Product: Wireless_Device
[ 350.032038] usb 2-1: Manufacturer: MediaTek Inc.
[ 350.032043] usb 2-1: SerialNumber: 000000000
[ 352.065633] Bluetooth: hci0: Opcode 0x c03 failed: -110
[ 352.195642] usb 2-1: reset SuperSpeed USB device number 4 using xhci_hcd
[ 352.360257] mt7921u 2-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20220908210919a
[ 352.374794] mt7921u 2-1:1.3: WM Firmware Version: ____010000, Build Time: 20220908211021
[ 354.020290] mt7921u 2-1:1.3 wlxe0e1a934a6a9: renamed from wlan1
[ 354.241576] Bluetooth: hci0: Opcode 0x c03 failed: -110
[ 374.455254] IPv6: ADDRCONF(NETDEV_CHANGE): wlxe0e1a934a6a9: link becomes ready
Additional context
No response
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·