Rpi goes into kernel panic once LTE USB Dongle is disconnected

Open
#5,116 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux

Research direction

Start by reproducing the disconnect and reboot cases with the Raspberry Pi 3 Model B+, Alcatel IK41VE1, and the listed 5.10.103-v7+ kernel. Inspect bug_report.txt and the warning at drivers/net/phy/phy.c:958 alongside the cdc_mbim, USB, and network errors. Done means disconnecting or rebooting no longer causes repeated errors, a kernel warning, freezing, or the need for a power cycle.

Written by the indexing model from the issue text.

Description

Describe the bug

Once LTE USB Dongle is disconnected "nonzero urb status received: -71, wdm_int_callback - 0 bytes" errors are thrown indefinitely.
Raspberry Pi is frozen and it's not possible to reach it until the system is power cycled.

Steps to reproduce the behaviour
  1. Connect a USB Dongle to Raspberry Pi 3 Model B+ to any USB
  2. Wait until it's connected to the Internet (connection is established by using ModemManager)
  3. Disconnect the USB Dongle
Device (s)

Raspberry Pi 3 Mod. B+

System

OS and version:
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, fa45ccf5a4b183ee566b36d74fb4b65bf9358bed, stage2

Firmware version:
Dec 1 2021 15:07:06
Copyright (c) 2012 Broadcom
version 71bd3109023a0c8575585ba87cbb374d2eeb038f (clean) (release) (start)

Kernel version:
Linux aqueduct 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux

LTE USB Dongle:
Alcatel IK41VE1

Logs

kernel: [ 70.955000] cdc_mbim 1-1.2:1.3: nonzero urb status received: -71
kernel: [ 70.957710] cdc_mbim 1-1.2:1.3: wdm_int_callback - 0 bytes
kernel: [ 71.058078] cdc_mbim 1-1.2:1.3: nonzero urb status received: -71
kernel: [ 71.060809] cdc_mbim 1-1.2:1.3: wdm_int_callback - 0 bytes
kernel: [ 71.602750] ERROR::dwc_otg_hcd_urb_enqueue:501: Not connected
kernel: [ 71.609973] cdc_mbim 1-1.2:1.3: Tx URB error: -19
kernel: [ 71.689118] ERROR::dwc_otg_hcd_urb_enqueue:501: Not connected
kernel: [ 71.696328] option1 ttyUSB0: usb_wwan_write: submit urb 0 failed: -19
kernel: [ 71.707848] ERROR::dwc_otg_hcd_urb_enqueue:501: Not connected
kernel: [ 71.715463] smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -19
kernel: [ 71.718163] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
kernel: [ 71.720804] smsc95xx 1-1.1:1.0 eth0: __smsc95xx_mdio_read: MII is busy
kernel: [ 72.462173] option1 ttyUSB0: usb_wwan_write: submit urb 0 failed: -19
kernel: [ 72.579529]
kernel: [ 72.579553] ERROR::dwc_otg_hcd_urb_enqueue:501: Not connected
kernel: [ 72.579553]
kernel: [ 72.591639] smsc95xx 1-1.1:1.0 eth0: Failed to read
reg index 0x00000114: -19
kernel: [ 72.595558] smsc95xx 1-1.1:1.0 eth0: Error reading MII_ACCESS
kernel: [ 72.599452] smsc95xx 1-1.1:1.0 eth0: __smsc95xx_mdio_read: MII is busy
Aug 2 09:23:32 aqueduct kernel: [ 71.802033] ------------[ cut here ]------------
Aug 2 09:23:32 aqueduct kernel: [ 71.804794] WARNING: CPU: 0 PID: 48 at drivers/net/phy/phy.c:958 phy_error+0x30/0x70
Aug 2 09:23:32 aqueduct kernel: [ 71.807587] Modules linked in: hci_uart btbcm bluetooth ecdh_generic ecc libaes vc4 cec 8021q garp stp llc drm_kms_helper drm drm_panel_orientation_quirks brcmfmac brcmutil snd_soc_core snd_compress snd_pcm_dmaengine syscopyarea sysfillrect sysimgblt fb_sys_fops sha256_generic libsha256 raspberrypi_hwmon backlight cfg80211 rfkill bcm2835_codec(C) bcm2835_v4l2(C) bcm2835_isp(C) v4l2_mem2mem snd_bcm2835(C) bcm2835_mmal_vchiq(C) videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common snd_pcm snd_timer videodev snd vc_sm_cma(C) mc cdc_mbim cdc_wdm option cdc_ncm usb_wwan usbserial cdc_ether fixed uio_pdrv_genirq uio ip_tables x_tables ipv6
kernel: [ 71.826806] CPU: 0 PID: 48 Comm: kworker/0:3 Tainted: G C 5.10.103+ #1529
kernel: [ 71.830315] Hardware name: BCM2835
kernel: [ 71.833764] Workqueue: events_power_efficient phy_state_machine
kernel: [ 71.837233] Backtrace:
kernel: [ 71.840735] [] (dump_backtrace) from [] (show_stack+0x20/0x24)
kernel: [ 71.844326] r7:000003be r6:00000009 r5:c06096d8 r4:c0a73108
kernel: [ 71.847894] [] (show_stack) from [] (dump_stack+0x28/0x30)
kernel: [ 71.851562] [] (dump_stack) from [] (__warn+0xe8/0x110)
kernel: [ 71.855232] r5:c06096d8 r4:c0ac236c
kernel: [ 71.858863] [] (__warn) from [] (warn_slowpath_fmt+0x68/0xd8)
kernel: [ 71.862610] r7:00000009 r6:c06096d8 r5:000003be r4:c0ac236c
kernel: [ 71.866384] [] (warn_slowpath_fmt) from [] (phy_error+0x30/0x70)
kernel: [ 71.870243] r9:ffffffed r8:c190f000 r7:00000005 r6:c0bb7028 r5:c190f318 r4:c190f000
kernel: [ 71.874099] [] (phy_error) from [] (phy_state_machine+0xec/0x224)
kernel: [ 71.878004] r5:c190f318 r4:c190f2ec
kernel: [ 71.881956] [] (phy_state_machine) from [] (process_one_work+0x208/0x4dc)
kernel: [ 71.885968] r9:00000000 r8:00000000 r7:dbf57700 r6:00000000 r5:c18ed6c0 r4:c190f2ec
kernel: [ 71.890088] [] (process_one_work) from [] (worker_thread+0x34/0x594)
kernel: [ 71.894200] r10:c0bc0304 r9:00000008 r8:c0c2bea0 r7:c0bc0318 r6:c18ed6d4 r5:c0bc0304
kernel: [ 71.898307] r4:c18ed6c0
kernel: [ 71.902499] [] (worker_thread) from [] (kthread+0x148/0x15c)
kernel: [ 71.906749] r10:c1117e88 r9:c18ed6c0 r8:c003e058 r7:c190a000 r6:00000000 r5:c18e1cc0
kernel: [ 71.911052] r4:c18e2e80 r3:00000000
kernel: [ 71.915310] [] (kthread) from [] (ret_from_fork+0x14/0x28)
kernel: [ 71.919674] Exception stack(0xc190bfb0 to 0xc190bff8)
kernel: [ 71.923990] bfa0: 00000000 00000000 00000000 00000000
kernel: [ 71.928365] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
kernel: [ 71.932764] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
kernel: [ 71.937089] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0043880
kernel: [ 71.941438] r4:c18e1cc0
kernel: [ 71.945724] ---[ end trace b63e2e5b1bb43148 ]---
Complete logs are in attachments.
bug_report.txt

Additional context

Expected behaviour:
Raspberry Pi continues to function normally.

Note: The issue is also reproducible sometimes during system reboot. (after calling: sudo reboot now)

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

  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 raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.