kimocoder / realtek_rtwifi

Realtek RTL8xxxU
https://www.aircrack-ng.org
68 stars 14 forks source link

rtl8xxxu: probe of 3-1.1.2:1.0 failed with error -12 after kernel update to 6.2.1 #36

Closed ZerBea closed 1 year ago

ZerBea commented 1 year ago

Driver crashed on kernel 6.2.1 $ uname -r 6.2.1-arch1-1

Regardless what type of interface is plugged in:

$ lsusb
ID 7392:b811 Edimax Technology Co., Ltd Edimax N150 Adapter

[   85.861574] usbcore: registered new interface driver rtl8xxxu
[   89.019052] usb 3-1.1.2: new high-speed USB device number 8 using xhci_hcd
[   89.209472] usb 3-1.1.2: New USB device found, idVendor=7392, idProduct=b811, bcdDevice= 0.00
[   89.209477] usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   89.209479] usb 3-1.1.2: Product: Edimax N150 Adapter
[   89.209481] usb 3-1.1.2: Manufacturer: Realtek
[   89.209482] usb 3-1.1.2: SerialNumber: 08BEAC305ACF
[   89.210139] usb 3-1.1.2: This Realtek USB WiFi dongle (0x7392:0xb811) is untested!
[   89.210141] usb 3-1.1.2: Please report results to Jes.Sorensen@gmail.com
[   89.210152] ------------[ cut here ]------------
[   89.210153] WARNING: CPU: 9 PID: 199 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[   89.210205] Modules linked in: rtl8xxxu(OE) mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 mac80211 libarc4 cfg80211 rfkill 8021q garp mrp stp llc nvidia_drm(POE) nvidia_modeset(POE) nvidia_uvm(POE) nvidia(POE) snd_hda_codec_realtek intel_rapl_msr intel_rapl_common snd_hda_codec_generic edac_mce_amd ledtrig_audio snd_hda_codec_hdmi nls_iso8859_1 joydev vfat fat ppdev mousedev snd_hda_intel snd_intel_dspcfg kvm snd_intel_sdw_acpi snd_hda_codec r8169 irqbypass crct10dif_pclmul snd_hda_core crc32_pclmul polyval_clmulni polyval_generic snd_hwdep gf128mul snd_pcm ghash_clmulni_intel sha512_ssse3 realtek aesni_intel snd_timer crypto_simd mdio_devres parport_pc sp5100_tco cryptd usbhid rapl snd wmi_bmof ccp libphy pcspkr video soundcore i2c_piix4 k10temp parport gpio_amdpt gpio_generic acpi_cpufreq mac_hid sg crypto_user fuse dm_mod loop bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 nvme mxm_wmi nvme_core sr_mod crc32c_intel xhci_pci cdrom nvme_common
[   89.210261]  xhci_pci_renesas wmi
[   89.210264] CPU: 9 PID: 199 Comm: kworker/9:2 Tainted: P           OE      6.2.1-arch1-1 #1 826b345887e8fd845ab37a52cb3a6655383f6b60
[   89.210267] Hardware name: Micro-Star International Co., Ltd. MS-7A33/X370 KRAIT GAMING (MS-7A33), BIOS 1.F0 11/06/2018
[   89.210269] Workqueue: usb_hub_wq hub_event
[   89.210273] RIP: 0010:ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[   89.210320] Code: be 80 00 00 00 00 74 22 48 83 be e8 02 00 00 00 74 18 48 83 be 38 01 00 00 00 74 2b 48 83 be 08 01 00 00 00 74 17 0f 0b eb 02 <0f> 0b 45 31 e4 5b 5d 4c 89 e0 41 5c 41 5d e9 7a 04 d3 cc 48 83 be
[   89.210322] RSP: 0018:ffffaab7c0d9b818 EFLAGS: 00010246
[   89.210324] RAX: 0000000000000000 RBX: ffffffffc0c01d60 RCX: 0000000000000027
[   89.210326] RDX: 0000000000000000 RSI: ffffffffc0c026e0 RDI: 00000000000007d8
[   89.210327] RBP: ffffffffc0c026e0 R08: 0000000000000000 R09: ffffaab7c0d9b5d8
[   89.210328] R10: 0000000000000003 R11: ffffffff92ec9a68 R12: ffffffffc0c01d60
[   89.210329] R13: ffff96b9a029d8a8 R14: ffff96b9a02b7400 R15: ffff96b9a029d800
[   89.210330] FS:  0000000000000000(0000) GS:ffff96bc8f040000(0000) knlGS:0000000000000000
[   89.210332] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   89.210333] CR2: 00007f522ea76374 CR3: 00000001235b0000 CR4: 00000000003506e0
[   89.210335] Call Trace:
[   89.210336]  <TASK>
[   89.210339]  rtl8xxxu_probe+0x8d/0x8d0 [rtl8xxxu 5688ac7302b5a4a5a1580e72c18177088b5d8e10]
[   89.210353]  ? __pm_runtime_set_status+0x1a9/0x300
[   89.210357]  usb_probe_interface+0xe6/0x2b0
[   89.210361]  really_probe+0xde/0x380
[   89.210364]  ? pm_runtime_barrier+0x54/0x90
[   89.210367]  __driver_probe_device+0x78/0x170
[   89.210370]  driver_probe_device+0x1f/0x90
[   89.210373]  __device_attach_driver+0x89/0x110
[   89.210375]  ? __pfx___device_attach_driver+0x10/0x10
[   89.210378]  bus_for_each_drv+0x8f/0xe0
[   89.210381]  __device_attach+0xb2/0x1e0
[   89.210384]  bus_probe_device+0x92/0xb0
[   89.210386]  device_add+0x422/0x9a0
[   89.210388]  ? sysfs_merge_group+0xd4/0x110
[   89.210392]  usb_set_configuration+0x575/0x820
[   89.210395]  usb_generic_driver_probe+0x4f/0x70
[   89.210398]  usb_probe_device+0x3d/0x110
[   89.210401]  really_probe+0xde/0x380
[   89.210403]  ? pm_runtime_barrier+0x54/0x90
[   89.210406]  __driver_probe_device+0x78/0x170
[   89.210408]  driver_probe_device+0x1f/0x90
[   89.210411]  __device_attach_driver+0x89/0x110
[   89.210414]  ? __pfx___device_attach_driver+0x10/0x10
[   89.210416]  bus_for_each_drv+0x8f/0xe0
[   89.210419]  __device_attach+0xb2/0x1e0
[   89.210422]  bus_probe_device+0x92/0xb0
[   89.210424]  device_add+0x422/0x9a0
[   89.210426]  ? blake2s_update+0x4c/0xc0
[   89.210429]  usb_new_device.cold+0x148/0x36d
[   89.210433]  hub_event+0x1239/0x19c0
[   89.210437]  ? queue_delayed_work_on+0x3d/0x50
[   89.210441]  process_one_work+0x1c8/0x380
[   89.210444]  worker_thread+0x51/0x390
[   89.210447]  ? __pfx_worker_thread+0x10/0x10
[   89.210449]  kthread+0xde/0x110
[   89.210452]  ? __pfx_kthread+0x10/0x10
[   89.210453]  ret_from_fork+0x2c/0x50
[   89.210458]  </TASK>
[   89.210459] ---[ end trace 0000000000000000 ]---
[   89.210461] rtl8xxxu: probe of 3-1.1.2:1.0 failed with error -12
[  338.313218] usb 3-1.4: new high-speed USB device number 9 using xhci_hcd
[  338.406327] usb 3-1.4: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00
[  338.406337] usb 3-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  338.406341] usb 3-1.4: Product: USB WLAN
[  338.406344] usb 3-1.4: Manufacturer: 802.11n
[  338.406346] usb 3-1.4: SerialNumber: 00e04c000001
[  338.458296] ------------[ cut here ]------------
[  338.458301] WARNING: CPU: 2 PID: 141 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[  338.458408] Modules linked in: rtl8xxxu(OE) mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 mac80211 libarc4 cfg80211 rfkill 8021q garp mrp stp llc nvidia_drm(POE) nvidia_modeset(POE) nvidia_uvm(POE) nvidia(POE) snd_hda_codec_realtek intel_rapl_msr intel_rapl_common snd_hda_codec_generic edac_mce_amd ledtrig_audio snd_hda_codec_hdmi nls_iso8859_1 joydev vfat fat ppdev mousedev snd_hda_intel snd_intel_dspcfg kvm snd_intel_sdw_acpi snd_hda_codec r8169 irqbypass crct10dif_pclmul snd_hda_core crc32_pclmul polyval_clmulni polyval_generic snd_hwdep gf128mul snd_pcm ghash_clmulni_intel sha512_ssse3 realtek aesni_intel snd_timer crypto_simd mdio_devres parport_pc sp5100_tco cryptd usbhid rapl snd wmi_bmof ccp libphy pcspkr video soundcore i2c_piix4 k10temp parport gpio_amdpt gpio_generic acpi_cpufreq mac_hid sg crypto_user fuse dm_mod loop bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 nvme mxm_wmi nvme_core sr_mod crc32c_intel xhci_pci cdrom nvme_common
[  338.458511]  xhci_pci_renesas wmi
[  338.458516] CPU: 2 PID: 141 Comm: kworker/2:1 Tainted: P        W  OE      6.2.1-arch1-1 #1 826b345887e8fd845ab37a52cb3a6655383f6b60
[  338.458522] Hardware name: Micro-Star International Co., Ltd. MS-7A33/X370 KRAIT GAMING (MS-7A33), BIOS 1.F0 11/06/2018
[  338.458525] Workqueue: usb_hub_wq hub_event
[  338.458532] RIP: 0010:ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[  338.458631] Code: be 80 00 00 00 00 74 22 48 83 be e8 02 00 00 00 74 18 48 83 be 38 01 00 00 00 74 2b 48 83 be 08 01 00 00 00 74 17 0f 0b eb 02 <0f> 0b 45 31 e4 5b 5d 4c 89 e0 41 5c 41 5d e9 7a 04 d3 cc 48 83 be
[  338.458634] RSP: 0018:ffffaab7c0697818 EFLAGS: 00010246
[  338.458638] RAX: 0000000000000002 RBX: ffffffffc0c01dc0 RCX: 0000000000000001
[  338.458641] RDX: 0000000000000000 RSI: ffffffffc0c026e0 RDI: 00000000000007d8
[  338.458643] RBP: ffffffffc0c026e0 R08: 0000000000000000 R09: ffff96b9801e0c10
[  338.458645] R10: ffff96b9dbfc2018 R11: 0000000000000000 R12: ffffffffc0c01dc0
[  338.458647] R13: ffffffffc0c16670 R14: ffff96b9aa519800 R15: ffff96b9fd3a6800
[  338.458650] FS:  0000000000000000(0000) GS:ffff96bc8ee80000(0000) knlGS:0000000000000000
[  338.458653] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  338.458655] CR2: 00007f0cc4043fe0 CR3: 0000000105c72000 CR4: 00000000003506e0
[  338.458658] Call Trace:
[  338.458661]  <TASK>
[  338.458667]  rtl8xxxu_probe+0x8d/0x8d0 [rtl8xxxu 5688ac7302b5a4a5a1580e72c18177088b5d8e10]
[  338.458694]  ? __pm_runtime_set_status+0x1a9/0x300
[  338.458703]  usb_probe_interface+0xe6/0x2b0
[  338.458709]  really_probe+0xde/0x380
[  338.458715]  ? pm_runtime_barrier+0x54/0x90
[  338.458721]  __driver_probe_device+0x78/0x170
[  338.458727]  driver_probe_device+0x1f/0x90
[  338.458733]  __device_attach_driver+0x89/0x110
[  338.458739]  ? __pfx___device_attach_driver+0x10/0x10
[  338.458744]  bus_for_each_drv+0x8f/0xe0
[  338.458750]  __device_attach+0xb2/0x1e0
[  338.458756]  bus_probe_device+0x92/0xb0
[  338.458761]  device_add+0x422/0x9a0
[  338.458765]  ? usb_control_msg_send+0x9c/0xd0
[  338.458772]  usb_set_configuration+0x575/0x820
[  338.458778]  usb_generic_driver_probe+0x4f/0x70
[  338.458784]  usb_probe_device+0x3d/0x110
[  338.458789]  really_probe+0xde/0x380
[  338.458794]  ? pm_runtime_barrier+0x54/0x90
[  338.458799]  __driver_probe_device+0x78/0x170
[  338.458805]  driver_probe_device+0x1f/0x90
[  338.458810]  __device_attach_driver+0x89/0x110
[  338.458816]  ? __pfx___device_attach_driver+0x10/0x10
[  338.458822]  bus_for_each_drv+0x8f/0xe0
[  338.458827]  __device_attach+0xb2/0x1e0
[  338.458833]  bus_probe_device+0x92/0xb0
[  338.458838]  device_add+0x422/0x9a0
[  338.458842]  ? blake2s_update+0x4c/0xc0
[  338.458848]  usb_new_device.cold+0x148/0x36d
[  338.458855]  hub_event+0x1239/0x19c0
[  338.458862]  ? queue_delayed_work_on+0x3d/0x50
[  338.458870]  process_one_work+0x1c8/0x380
[  338.458876]  worker_thread+0x51/0x390
[  338.458882]  ? __pfx_worker_thread+0x10/0x10
[  338.458887]  kthread+0xde/0x110
[  338.458891]  ? __pfx_kthread+0x10/0x10
[  338.458895]  ret_from_fork+0x2c/0x50
[  338.458904]  </TASK>
[  338.458906] ---[ end trace 0000000000000000 ]---
[  338.458910] rtl8xxxu: probe of 3-1.4:1.0 failed with error -12
$ lsusb
ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter

[   85.861574] usbcore: registered new interface driver rtl8xxxu
[   89.019052] usb 3-1.1.2: new high-speed USB device number 8 using xhci_hcd
[   89.209472] usb 3-1.1.2: New USB device found, idVendor=7392, idProduct=b811, bcdDevice= 0.00
[   89.209477] usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   89.209479] usb 3-1.1.2: Product: Edimax N150 Adapter
[   89.209481] usb 3-1.1.2: Manufacturer: Realtek
[   89.209482] usb 3-1.1.2: SerialNumber: 08BEAC305ACF
[   89.210139] usb 3-1.1.2: This Realtek USB WiFi dongle (0x7392:0xb811) is untested!
[   89.210141] usb 3-1.1.2: Please report results to Jes.Sorensen@gmail.com
[   89.210152] ------------[ cut here ]------------
[   89.210153] WARNING: CPU: 9 PID: 199 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[   89.210205] Modules linked in: rtl8xxxu(OE) mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 mac80211 libarc4 cfg80211 rfkill 8021q garp mrp stp llc nvidia_drm(POE) nvidia_modeset(POE) nvidia_uvm(POE) nvidia(POE) snd_hda_codec_realtek intel_rapl_msr intel_rapl_common snd_hda_codec_generic edac_mce_amd ledtrig_audio snd_hda_codec_hdmi nls_iso8859_1 joydev vfat fat ppdev mousedev snd_hda_intel snd_intel_dspcfg kvm snd_intel_sdw_acpi snd_hda_codec r8169 irqbypass crct10dif_pclmul snd_hda_core crc32_pclmul polyval_clmulni polyval_generic snd_hwdep gf128mul snd_pcm ghash_clmulni_intel sha512_ssse3 realtek aesni_intel snd_timer crypto_simd mdio_devres parport_pc sp5100_tco cryptd usbhid rapl snd wmi_bmof ccp libphy pcspkr video soundcore i2c_piix4 k10temp parport gpio_amdpt gpio_generic acpi_cpufreq mac_hid sg crypto_user fuse dm_mod loop bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 nvme mxm_wmi nvme_core sr_mod crc32c_intel xhci_pci cdrom nvme_common
[   89.210261]  xhci_pci_renesas wmi
[   89.210264] CPU: 9 PID: 199 Comm: kworker/9:2 Tainted: P           OE      6.2.1-arch1-1 #1 826b345887e8fd845ab37a52cb3a6655383f6b60
[   89.210267] Hardware name: Micro-Star International Co., Ltd. MS-7A33/X370 KRAIT GAMING (MS-7A33), BIOS 1.F0 11/06/2018
[   89.210269] Workqueue: usb_hub_wq hub_event
[   89.210273] RIP: 0010:ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[   89.210320] Code: be 80 00 00 00 00 74 22 48 83 be e8 02 00 00 00 74 18 48 83 be 38 01 00 00 00 74 2b 48 83 be 08 01 00 00 00 74 17 0f 0b eb 02 <0f> 0b 45 31 e4 5b 5d 4c 89 e0 41 5c 41 5d e9 7a 04 d3 cc 48 83 be
[   89.210322] RSP: 0018:ffffaab7c0d9b818 EFLAGS: 00010246
[   89.210324] RAX: 0000000000000000 RBX: ffffffffc0c01d60 RCX: 0000000000000027
[   89.210326] RDX: 0000000000000000 RSI: ffffffffc0c026e0 RDI: 00000000000007d8
[   89.210327] RBP: ffffffffc0c026e0 R08: 0000000000000000 R09: ffffaab7c0d9b5d8
[   89.210328] R10: 0000000000000003 R11: ffffffff92ec9a68 R12: ffffffffc0c01d60
[   89.210329] R13: ffff96b9a029d8a8 R14: ffff96b9a02b7400 R15: ffff96b9a029d800
[   89.210330] FS:  0000000000000000(0000) GS:ffff96bc8f040000(0000) knlGS:0000000000000000
[   89.210332] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   89.210333] CR2: 00007f522ea76374 CR3: 00000001235b0000 CR4: 00000000003506e0
[   89.210335] Call Trace:
[   89.210336]  <TASK>
[   89.210339]  rtl8xxxu_probe+0x8d/0x8d0 [rtl8xxxu 5688ac7302b5a4a5a1580e72c18177088b5d8e10]
[   89.210353]  ? __pm_runtime_set_status+0x1a9/0x300
[   89.210357]  usb_probe_interface+0xe6/0x2b0
[   89.210361]  really_probe+0xde/0x380
[   89.210364]  ? pm_runtime_barrier+0x54/0x90
[   89.210367]  __driver_probe_device+0x78/0x170
[   89.210370]  driver_probe_device+0x1f/0x90
[   89.210373]  __device_attach_driver+0x89/0x110
[   89.210375]  ? __pfx___device_attach_driver+0x10/0x10
[   89.210378]  bus_for_each_drv+0x8f/0xe0
[   89.210381]  __device_attach+0xb2/0x1e0
[   89.210384]  bus_probe_device+0x92/0xb0
[   89.210386]  device_add+0x422/0x9a0
[   89.210388]  ? sysfs_merge_group+0xd4/0x110
[   89.210392]  usb_set_configuration+0x575/0x820
[   89.210395]  usb_generic_driver_probe+0x4f/0x70
[   89.210398]  usb_probe_device+0x3d/0x110
[   89.210401]  really_probe+0xde/0x380
[   89.210403]  ? pm_runtime_barrier+0x54/0x90
[   89.210406]  __driver_probe_device+0x78/0x170
[   89.210408]  driver_probe_device+0x1f/0x90
[   89.210411]  __device_attach_driver+0x89/0x110
[   89.210414]  ? __pfx___device_attach_driver+0x10/0x10
[   89.210416]  bus_for_each_drv+0x8f/0xe0
[   89.210419]  __device_attach+0xb2/0x1e0
[   89.210422]  bus_probe_device+0x92/0xb0
[   89.210424]  device_add+0x422/0x9a0
[   89.210426]  ? blake2s_update+0x4c/0xc0
[   89.210429]  usb_new_device.cold+0x148/0x36d
[   89.210433]  hub_event+0x1239/0x19c0
[   89.210437]  ? queue_delayed_work_on+0x3d/0x50
[   89.210441]  process_one_work+0x1c8/0x380
[   89.210444]  worker_thread+0x51/0x390
[   89.210447]  ? __pfx_worker_thread+0x10/0x10
[   89.210449]  kthread+0xde/0x110
[   89.210452]  ? __pfx_kthread+0x10/0x10
[   89.210453]  ret_from_fork+0x2c/0x50
[   89.210458]  </TASK>
[   89.210459] ---[ end trace 0000000000000000 ]---
[   89.210461] rtl8xxxu: probe of 3-1.1.2:1.0 failed with error -12
[  338.313218] usb 3-1.4: new high-speed USB device number 9 using xhci_hcd
[  338.406327] usb 3-1.4: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00
[  338.406337] usb 3-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  338.406341] usb 3-1.4: Product: USB WLAN
[  338.406344] usb 3-1.4: Manufacturer: 802.11n
[  338.406346] usb 3-1.4: SerialNumber: 00e04c000001
[  338.458296] ------------[ cut here ]------------
[  338.458301] WARNING: CPU: 2 PID: 141 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[  338.458408] Modules linked in: rtl8xxxu(OE) mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 mac80211 libarc4 cfg80211 rfkill 8021q garp mrp stp llc nvidia_drm(POE) nvidia_modeset(POE) nvidia_uvm(POE) nvidia(POE) snd_hda_codec_realtek intel_rapl_msr intel_rapl_common snd_hda_codec_generic edac_mce_amd ledtrig_audio snd_hda_codec_hdmi nls_iso8859_1 joydev vfat fat ppdev mousedev snd_hda_intel snd_intel_dspcfg kvm snd_intel_sdw_acpi snd_hda_codec r8169 irqbypass crct10dif_pclmul snd_hda_core crc32_pclmul polyval_clmulni polyval_generic snd_hwdep gf128mul snd_pcm ghash_clmulni_intel sha512_ssse3 realtek aesni_intel snd_timer crypto_simd mdio_devres parport_pc sp5100_tco cryptd usbhid rapl snd wmi_bmof ccp libphy pcspkr video soundcore i2c_piix4 k10temp parport gpio_amdpt gpio_generic acpi_cpufreq mac_hid sg crypto_user fuse dm_mod loop bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 nvme mxm_wmi nvme_core sr_mod crc32c_intel xhci_pci cdrom nvme_common
[  338.458511]  xhci_pci_renesas wmi
[  338.458516] CPU: 2 PID: 141 Comm: kworker/2:1 Tainted: P        W  OE      6.2.1-arch1-1 #1 826b345887e8fd845ab37a52cb3a6655383f6b60
[  338.458522] Hardware name: Micro-Star International Co., Ltd. MS-7A33/X370 KRAIT GAMING (MS-7A33), BIOS 1.F0 11/06/2018
[  338.458525] Workqueue: usb_hub_wq hub_event
[  338.458532] RIP: 0010:ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[  338.458631] Code: be 80 00 00 00 00 74 22 48 83 be e8 02 00 00 00 74 18 48 83 be 38 01 00 00 00 74 2b 48 83 be 08 01 00 00 00 74 17 0f 0b eb 02 <0f> 0b 45 31 e4 5b 5d 4c 89 e0 41 5c 41 5d e9 7a 04 d3 cc 48 83 be
[  338.458634] RSP: 0018:ffffaab7c0697818 EFLAGS: 00010246
[  338.458638] RAX: 0000000000000002 RBX: ffffffffc0c01dc0 RCX: 0000000000000001
[  338.458641] RDX: 0000000000000000 RSI: ffffffffc0c026e0 RDI: 00000000000007d8
[  338.458643] RBP: ffffffffc0c026e0 R08: 0000000000000000 R09: ffff96b9801e0c10
[  338.458645] R10: ffff96b9dbfc2018 R11: 0000000000000000 R12: ffffffffc0c01dc0
[  338.458647] R13: ffffffffc0c16670 R14: ffff96b9aa519800 R15: ffff96b9fd3a6800
[  338.458650] FS:  0000000000000000(0000) GS:ffff96bc8ee80000(0000) knlGS:0000000000000000
[  338.458653] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  338.458655] CR2: 00007f0cc4043fe0 CR3: 0000000105c72000 CR4: 00000000003506e0
[  338.458658] Call Trace:
[  338.458661]  <TASK>
[  338.458667]  rtl8xxxu_probe+0x8d/0x8d0 [rtl8xxxu 5688ac7302b5a4a5a1580e72c18177088b5d8e10]
[  338.458694]  ? __pm_runtime_set_status+0x1a9/0x300
[  338.458703]  usb_probe_interface+0xe6/0x2b0
[  338.458709]  really_probe+0xde/0x380
[  338.458715]  ? pm_runtime_barrier+0x54/0x90
[  338.458721]  __driver_probe_device+0x78/0x170
[  338.458727]  driver_probe_device+0x1f/0x90
[  338.458733]  __device_attach_driver+0x89/0x110
[  338.458739]  ? __pfx___device_attach_driver+0x10/0x10
[  338.458744]  bus_for_each_drv+0x8f/0xe0
[  338.458750]  __device_attach+0xb2/0x1e0
[  338.458756]  bus_probe_device+0x92/0xb0
[  338.458761]  device_add+0x422/0x9a0
[  338.458765]  ? usb_control_msg_send+0x9c/0xd0
[  338.458772]  usb_set_configuration+0x575/0x820
[  338.458778]  usb_generic_driver_probe+0x4f/0x70
[  338.458784]  usb_probe_device+0x3d/0x110
[  338.458789]  really_probe+0xde/0x380
[  338.458794]  ? pm_runtime_barrier+0x54/0x90
[  338.458799]  __driver_probe_device+0x78/0x170
[  338.458805]  driver_probe_device+0x1f/0x90
[  338.458810]  __device_attach_driver+0x89/0x110
[  338.458816]  ? __pfx___device_attach_driver+0x10/0x10
[  338.458822]  bus_for_each_drv+0x8f/0xe0
[  338.458827]  __device_attach+0xb2/0x1e0
[  338.458833]  bus_probe_device+0x92/0xb0
[  338.458838]  device_add+0x422/0x9a0
[  338.458842]  ? blake2s_update+0x4c/0xc0
[  338.458848]  usb_new_device.cold+0x148/0x36d
[  338.458855]  hub_event+0x1239/0x19c0
[  338.458862]  ? queue_delayed_work_on+0x3d/0x50
[  338.458870]  process_one_work+0x1c8/0x380
[  338.458876]  worker_thread+0x51/0x390
[  338.458882]  ? __pfx_worker_thread+0x10/0x10
[  338.458887]  kthread+0xde/0x110
[  338.458891]  ? __pfx_kthread+0x10/0x10
[  338.458895]  ret_from_fork+0x2c/0x50
[  338.458904]  </TASK>
[  338.458906] ---[ end trace 0000000000000000 ]---
[  338.458910] rtl8xxxu: probe of 3-1.4:1.0 failed with error -12
ZerBea commented 1 year ago

Driver still crash after last commits on $ uname -r 6.2.2-arch2-1

BTW: Linux kernel stock driver is not affected. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/wireless/realtek/rtl8xxxu?h=v6.2.5

kimocoder commented 1 year ago

Yup, fix it later today 👍

ZerBea commented 1 year ago

Great. Than I can test latest hcxlabtool features on that driver.

kimocoder commented 1 year ago

Just hold on some days, I've got too much to do atm

ZerBea commented 1 year ago

No problem, we have time.

kimocoder commented 1 year ago

Try now, I reverted the USB stuff.

ZerBea commented 1 year ago

Thanks for your effort. Unfortunately the problem still exist:

[   25.790233] usb 3-1.2: new high-speed USB device number 7 using xhci_hcd
[   25.881062] usb 3-1.2: New USB device found, idVendor=2357, idProduct=010c, bcdDevice= 0.00
[   25.881072] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   25.881076] usb 3-1.2: Product: 802.11n NIC
[   25.881078] usb 3-1.2: Manufacturer: Realtek
[   25.881081] usb 3-1.2: SerialNumber: 00E04C0001
[   51.184011] usb 3-1.2: USB disconnect, device number 7
[  100.296331] usbcore: registered new interface driver rtl8xxxu
[  103.868971] usb 3-1.2: new high-speed USB device number 8 using xhci_hcd
[  103.959713] usb 3-1.2: New USB device found, idVendor=2357, idProduct=010c, bcdDevice= 0.00
[  103.959722] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  103.959726] usb 3-1.2: Product: 802.11n NIC
[  103.959729] usb 3-1.2: Manufacturer: Realtek
[  103.959732] usb 3-1.2: SerialNumber: 00E04C0001
[  103.960843] usb 3-1.2: This Realtek USB WiFi dongle (0x2357:0x010c) is untested!
[  103.960848] usb 3-1.2: Please report results to Jes.Sorensen@gmail.com
[  103.960868] ------------[ cut here ]------------
[  103.960870] WARNING: CPU: 2 PID: 134 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[  103.960989] Modules linked in: rtl8xxxu(OE) mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 mac80211 libarc4 cfg80211 rfkill 8021q garp mrp stp llc nvidia_drm(POE) nvidia_uvm(POE) nvidia_modeset(POE) nvidia(POE) intel_rapl_msr intel_rapl_common edac_mce_amd snd_hda_codec_realtek snd_hda_codec_generic joydev ledtrig_audio mousedev kvm snd_hda_codec_hdmi nls_iso8859_1 snd_hda_intel irqbypass snd_intel_dspcfg crct10dif_pclmul snd_intel_sdw_acpi vfat crc32_pclmul fat polyval_clmulni snd_hda_codec polyval_generic gf128mul snd_hda_core ghash_clmulni_intel r8169 sha512_ssse3 snd_hwdep ppdev aesni_intel realtek snd_pcm mdio_devres crypto_simd snd_timer sp5100_tco cryptd usbhid wmi_bmof rapl snd libphy video pcspkr ccp k10temp soundcore i2c_piix4 parport_pc parport gpio_amdpt gpio_generic acpi_cpufreq mac_hid sg crypto_user dm_mod loop fuse bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 nvme sr_mod mxm_wmi crc32c_intel nvme_core cdrom xhci_pci nvme_common
[  103.961102]  xhci_pci_renesas wmi
[  103.961107] CPU: 2 PID: 134 Comm: kworker/2:1 Tainted: P           OE      6.2.5-arch1-1 #1 fcf70e9d97e045884ea945a3d5b5ff73b06f7a27
[  103.961114] Hardware name: Micro-Star International Co., Ltd. MS-7A33/X370 KRAIT GAMING (MS-7A33), BIOS 1.F0 11/06/2018
[  103.961117] Workqueue: usb_hub_wq hub_event
[  103.961125] RIP: 0010:ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[  103.961237] Code: be 80 00 00 00 00 74 22 48 83 be e8 02 00 00 00 74 18 48 83 be 38 01 00 00 00 74 2b 48 83 be 08 01 00 00 00 74 17 0f 0b eb 02 <0f> 0b 45 31 e4 5b 5d 4c 89 e0 41 5c 41 5d e9 ba 9e 03 ce 48 83 be
[  103.961241] RSP: 0018:ffffc2c64065f870 EFLAGS: 00010246
[  103.961246] RAX: 0000000000000000 RBX: ffffffffc0dbcc80 RCX: 0000000000000027
[  103.961249] RDX: 0000000000000000 RSI: ffffffffc0dbd6c0 RDI: 00000000000007f8
[  103.961251] RBP: ffffffffc0dbd6c0 R08: 0000000000000000 R09: ffffc2c64065f668
[  103.961254] R10: 0000000000000003 R11: ffffffff940c9a68 R12: ffffffffc0dbcc80
[  103.961256] R13: ffffffffc0dd4710 R14: ffffa036ec4bcc00 R15: ffffa036dcffb800
[  103.961259] FS:  0000000000000000(0000) GS:ffffa039cee80000(0000) knlGS:0000000000000000
[  103.961263] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  103.961266] CR2: 00005592c61fe170 CR3: 00000001177da000 CR4: 00000000003506e0
[  103.961269] Call Trace:
[  103.961272]  <TASK>
[  103.961277]  rtl8xxxu_probe+0xb6/0x2130 [rtl8xxxu 6993fbeea2e868a7a74512c7f4778e9c25b9e13b]
[  103.961310]  ? __pm_runtime_set_status+0x1a9/0x340
[  103.961320]  usb_probe_interface+0xe6/0x2f0
[  103.961328]  really_probe+0x1b9/0x410
[  103.961334]  __driver_probe_device+0x78/0x170
[  103.961339]  driver_probe_device+0x1f/0x90
[  103.961343]  __device_attach_driver+0x89/0x110
[  103.961348]  ? __pfx___device_attach_driver+0x10/0x10
[  103.961352]  bus_for_each_drv+0x8f/0xe0
[  103.961359]  __device_attach+0xb2/0x1e0
[  103.961364]  bus_probe_device+0x92/0xb0
[  103.961370]  device_add+0x413/0x8b0
[  103.961377]  usb_set_configuration+0x5c6/0x950
[  103.961384]  usb_generic_driver_probe+0x5c/0x90
[  103.961392]  usb_probe_device+0x3d/0x110
[  103.961397]  really_probe+0x1b9/0x410
[  103.961402]  __driver_probe_device+0x78/0x170
[  103.961406]  driver_probe_device+0x1f/0x90
[  103.961410]  __device_attach_driver+0x89/0x110
[  103.961415]  ? __pfx___device_attach_driver+0x10/0x10
[  103.961418]  bus_for_each_drv+0x8f/0xe0
[  103.961425]  __device_attach+0xb2/0x1e0
[  103.961429]  bus_probe_device+0x92/0xb0
[  103.961436]  device_add+0x413/0x8b0
[  103.961442]  usb_new_device+0x28e/0x4e0
[  103.961447]  hub_event+0x12ce/0x1c60
[  103.961457]  process_one_work+0x1c8/0x3c0
[  103.961465]  worker_thread+0x51/0x390
[  103.961471]  ? __pfx_worker_thread+0x10/0x10
[  103.961476]  kthread+0xde/0x110
[  103.961481]  ? __pfx_kthread+0x10/0x10
[  103.961486]  ret_from_fork+0x2c/0x50
[  103.961496]  </TASK>
[  103.961498] ---[ end trace 0000000000000000 ]---
[  103.961502] rtl8xxxu: probe of 3-1.2:1.0 failed with error -12
ZerBea commented 1 year ago

Just tested this driver version. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/realtek/rtl8xxxu?h=v6.3-rc2 Maybe we can find out, what went wrong.

[  359.193136] usbcore: deregistering interface driver rtl8xxxu
[  361.456418] usb 3-1.2: USB disconnect, device number 8
[  792.424988] usbcore: registered new interface driver rtl8xxxu
[  804.542444] usb 3-1.3: new high-speed USB device number 9 using xhci_hcd
[  804.633322] usb 3-1.3: New USB device found, idVendor=2357, idProduct=010c, bcdDevice= 0.00
[  804.633330] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  804.633334] usb 3-1.3: Product: 802.11n NIC
[  804.633337] usb 3-1.3: Manufacturer: Realtek
[  804.633340] usb 3-1.3: SerialNumber: 00E04C0001
[  804.634452] usb 3-1.3: This Realtek USB WiFi dongle (0x2357:0x010c) is untested!
[  804.634457] usb 3-1.3: Please report results to Jes.Sorensen@gmail.com
[  804.716324] usb 3-1.3: Vendor: Realtek
[  804.716330] usb 3-1.3: Product: 802.11n NIC
[  804.716333] usb 3-1.3: Serial: 00E04C0001
[  804.716335] usb 3-1.3: Dumping efuse for RTL8188EU (0x200 bytes):
[  804.716339] 00000000: 29 81 00 6c 0b 00 00 00 00 0c 00 00 00 00 00 00  )..l............
[  804.716342] 00000010: 30 30 30 2f 2f 2f 34 34 33 32 32 f1 ff ff ff ff  000///44322.....
[  804.716345] 00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716347] 00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716350] 00000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716352] 00000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716354] 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716356] 00000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716358] 00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716360] 00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716362] 000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716364] 000000b0: ff ff ff ff ff ff ff ff a1 1f 15 00 00 00 00 00  ................
[  804.716366] 000000c0: 00 01 00 10 00 00 00 00 00 03 ff ff ff ff ff ff  ................
[  804.716368] 000000d0: 57 23 0c 01 43 66 00 50 3e aa d5 e0 35 09 03 52  W#..Cf.P>...5..R
[  804.716370] 000000e0: 65 61 6c 74 65 6b 0d 03 38 30 32 2e 31 31 6e 20  ealtek..802.11n 
[  804.716372] 000000f0: 4e 49 43 0c 03 30 30 45 30 34 43 30 30 30 31 00  NIC..00E04C0001.
[  804.716375] 00000100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716377] 00000110: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716379] 00000120: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716381] 00000130: 81 ae 96 2d 03 93 96 11 fc 8c 00 11 9b ff ff ff  ...-............
[  804.716383] 00000140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716385] 00000150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716387] 00000160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716389] 00000170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716391] 00000180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716393] 00000190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716395] 000001a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716397] 000001b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716399] 000001c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716401] 000001d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716403] 000001e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716405] 000001f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[  804.716408] usb 3-1.3: RTL8188EU rev D (TSMC) romver 0, 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[  804.716414] usb 3-1.3: RTL8188EU MAC: 50:3e:aa:d5:e0:35
[  804.716417] usb 3-1.3: rtl8xxxu: Loading firmware rtlwifi/rtl8188eufw.bin
[  804.725570] usb 3-1.3: Firmware revision 11.1 (signature 0x88e1)
[  805.263764] rtl8xxxu 3-1.3:1.0 wlp39s0f3u1u3: renamed from wlan0
$ hcxlabtool -L

This is a highly experimental penetration testing tool!
It is made to detect vulnerabilities in your NETWORK mercilessly!
Requesting interface capabilities. This may take some time.
Please be patient...

available wlan devices:

phy idx hw-mac       virtual-mac  m ifname           driver (protocol)
---------------------------------------------------------------------------------------------
  1   4 503eaad5e035 503eaad5e035 + wlp39s0f3u1u3    rtl8xxxu (NETLINK & WIRELESS EXTENSIONS)

* active monitor mode available
+ monitor mode available
- no monitor mode available

bye-bye
$ hcxlabtool -I wlp39s0f3u1u3

This is a highly experimental penetration testing tool!
It is made to detect vulnerabilities in your NETWORK mercilessly!
Requesting interface capabilities. This may take some time.
Please be patient...

interface information:

phy idx hw-mac       virtual-mac  m ifname           driver (protocol)
---------------------------------------------------------------------------------------------
  1   4 503eaad5e035 503eaad5e035 + wlp39s0f3u1u3    rtl8xxxu (NETLINK & WIRELESS EXTENSIONS)

available frequencies: frequency [channel] tx-power

  2412 [  1] 20.0 dBm     2417 [  2] 20.0 dBm     2422 [  3] 20.0 dBm     2427 [  4] 20.0 dBm
  2432 [  5] 20.0 dBm     2437 [  6] 20.0 dBm     2442 [  7] 20.0 dBm     2447 [  8] 20.0 dBm
  2452 [  9] 20.0 dBm     2457 [ 10] 20.0 dBm     2462 [ 11] 20.0 dBm     2467 [ 12] 20.0 dBm
  2472 [ 13] 20.0 dBm     2484 [ 14] disabled

bye-bye
ZerBea commented 1 year ago

Some additional information about the test: diff showing a lot of differences between stock kernel rtl8xxxu_core.c and this one here. Also the kernel driver doesn't stop working after a while as mentioned here: https://github.com/kimocoder/realtek_rtwifi/issues/34#issuecomment-1384144282

kimocoder commented 1 year ago

git pull and re-compile / test

ZerBea commented 1 year ago

Pulled the changes and recompiled the driver:

[ 5219.644495] mt76x0u 3-1.4:1.0 wlp39s0f3u1u4: renamed from wlan0
[ 5232.620125] usbcore: registered new interface driver rtl8xxxu
[ 5235.697679] usb 3-1.4: USB disconnect, device number 18
[ 5251.067386] usb 3-1.4: new high-speed USB device number 19 using xhci_hcd
[ 5251.159871] usb 3-1.4: New USB device found, idVendor=2357, idProduct=010c, bcdDevice= 0.00
[ 5251.159881] usb 3-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5251.159885] usb 3-1.4: Product: 802.11n NIC
[ 5251.159888] usb 3-1.4: Manufacturer: Realtek
[ 5251.159890] usb 3-1.4: SerialNumber: 00E04C0001
[ 5251.160703] ------------[ cut here ]------------
[ 5251.160706] WARNING: CPU: 10 PID: 7153 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[ 5251.160826] Modules linked in: rtl8xxxu(OE) uas usb_storage snd_seq_dummy snd_seq snd_seq_device mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 mac80211 libarc4 cfg80211 rfkill 8021q garp mrp stp llc nvidia_drm(POE) nvidia_uvm(POE) nvidia_modeset(POE) nvidia(POE) intel_rapl_msr intel_rapl_common edac_mce_amd snd_hda_codec_realtek snd_hda_codec_generic joydev ledtrig_audio mousedev kvm snd_hda_codec_hdmi nls_iso8859_1 snd_hda_intel irqbypass snd_intel_dspcfg crct10dif_pclmul snd_intel_sdw_acpi vfat crc32_pclmul fat polyval_clmulni snd_hda_codec polyval_generic gf128mul snd_hda_core ghash_clmulni_intel r8169 sha512_ssse3 snd_hwdep ppdev aesni_intel realtek snd_pcm mdio_devres crypto_simd snd_timer sp5100_tco cryptd usbhid wmi_bmof rapl snd libphy video pcspkr ccp k10temp soundcore i2c_piix4 parport_pc parport gpio_amdpt gpio_generic acpi_cpufreq mac_hid sg crypto_user dm_mod loop fuse bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 nvme sr_mod mxm_wmi
[ 5251.160942]  crc32c_intel nvme_core cdrom xhci_pci nvme_common xhci_pci_renesas wmi
[ 5251.160951] Unloaded tainted modules: rtl8xxxu(OE):2 [last unloaded: rtl8xxxu(OE)]
[ 5251.160958] CPU: 10 PID: 7153 Comm: kworker/10:2 Tainted: P        W  OE      6.2.5-arch1-1 #1 fcf70e9d97e045884ea945a3d5b5ff73b06f7a27
[ 5251.160965] Hardware name: Micro-Star International Co., Ltd. MS-7A33/X370 KRAIT GAMING (MS-7A33), BIOS 1.F0 11/06/2018
[ 5251.160968] Workqueue: usb_hub_wq hub_event
[ 5251.160977] RIP: 0010:ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[ 5251.161090] Code: be 80 00 00 00 00 74 22 48 83 be e8 02 00 00 00 74 18 48 83 be 38 01 00 00 00 74 2b 48 83 be 08 01 00 00 00 74 17 0f 0b eb 02 <0f> 0b 45 31 e4 5b 5d 4c 89 e0 41 5c 41 5d e9 ba 9e 03 ce 48 83 be
[ 5251.161094] RSP: 0018:ffffc2c64b54b878 EFLAGS: 00010246
[ 5251.161098] RAX: 0000000000002357 RBX: ffffffffc50b5ce0 RCX: 000000000000010c
[ 5251.161102] RDX: 0000000000000000 RSI: ffffffffc50b66e0 RDI: 00000000000007d8
[ 5251.161104] RBP: ffffffffc50b66e0 R08: 0000000000000000 R09: ffffa036c01e0cd0
[ 5251.161107] R10: ffffa037a9113930 R11: 0000000000000000 R12: ffffffffc50b5ce0
[ 5251.161109] R13: ffffffffc50ca670 R14: ffffa03935896800 R15: ffffa0394a52d800
[ 5251.161112] FS:  0000000000000000(0000) GS:ffffa039cf080000(0000) knlGS:0000000000000000
[ 5251.161116] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5251.161119] CR2: 00007f47be830128 CR3: 000000010a6d6000 CR4: 00000000003506e0
[ 5251.161122] Call Trace:
[ 5251.161126]  <TASK>
[ 5251.161132]  rtl8xxxu_probe+0xc4/0x2200 [rtl8xxxu 3c95c5d664f5f5a89b246f0b9428d4fbc2319ed0]
[ 5251.161162]  ? pm_runtime_enable+0x1f/0xc0
[ 5251.161170]  ? __pm_runtime_set_status+0x1a9/0x340
[ 5251.161179]  usb_probe_interface+0xe6/0x2f0
[ 5251.161187]  really_probe+0x1b9/0x410
[ 5251.161193]  __driver_probe_device+0x78/0x170
[ 5251.161198]  driver_probe_device+0x1f/0x90
[ 5251.161202]  __device_attach_driver+0x89/0x110
[ 5251.161207]  ? __pfx___device_attach_driver+0x10/0x10
[ 5251.161211]  bus_for_each_drv+0x8f/0xe0
[ 5251.161218]  __device_attach+0xb2/0x1e0
[ 5251.161223]  bus_probe_device+0x92/0xb0
[ 5251.161230]  device_add+0x413/0x8b0
[ 5251.161236]  usb_set_configuration+0x5c6/0x950
[ 5251.161244]  usb_generic_driver_probe+0x5c/0x90
[ 5251.161251]  usb_probe_device+0x3d/0x110
[ 5251.161257]  really_probe+0x1b9/0x410
[ 5251.161261]  __driver_probe_device+0x78/0x170
[ 5251.161266]  driver_probe_device+0x1f/0x90
[ 5251.161270]  __device_attach_driver+0x89/0x110
[ 5251.161274]  ? __pfx___device_attach_driver+0x10/0x10
[ 5251.161278]  bus_for_each_drv+0x8f/0xe0
[ 5251.161284]  __device_attach+0xb2/0x1e0
[ 5251.161289]  bus_probe_device+0x92/0xb0
[ 5251.161295]  device_add+0x413/0x8b0
[ 5251.161301]  usb_new_device+0x28e/0x4e0
[ 5251.161307]  hub_event+0x12ce/0x1c60
[ 5251.161315]  ? queue_delayed_work_on+0x3d/0x50
[ 5251.161324]  process_one_work+0x1c8/0x3c0
[ 5251.161331]  worker_thread+0x51/0x390
[ 5251.161337]  ? __pfx_worker_thread+0x10/0x10
[ 5251.161342]  kthread+0xde/0x110
[ 5251.161347]  ? __pfx_kthread+0x10/0x10
[ 5251.161352]  ret_from_fork+0x2c/0x50
[ 5251.161362]  </TASK>
[ 5251.161364] ---[ end trace 0000000000000000 ]---
[ 5251.161368] rtl8xxxu: probe of 3-1.4:1.0 failed with error -12
ZerBea commented 1 year ago

There is another difference between the two drivers: The kernel stock driver load NL80211 stack straight after the device is plugged in, while this driver doesn't.

ZerBea commented 1 year ago

Epic fail of me. Due to the crash, the driver wasn't correct unloaded by rmmod.

I'll do another test.

ZerBea commented 1 year ago

Nope, that wasn't the problem. Problem still occur after reboot. Looks like the driver crashed the entire NL80211 stack. Now I clean everything and try it again.

ZerBea commented 1 year ago

Now it is working as expected - after I removed the entire NL80211 stack and restarted everything again. The crash caused that everything became instable.

$ hcxlabtool -L

available wlan devices:

phy idx hw-mac       virtual-mac  m ifname           driver (protocol)
---------------------------------------------------------------------------------------------
  0   4 503eaad5e035 3a9b4a73c442 + wlp5s0f3u3       rtl8xxxu (NETLINK & WIRELESS EXTENSIONS)

+ monitor mode available
- no monitor mode available

bye-bye

Closed this, because the driver is fixed.
dubhater commented 1 year ago

"WARNING: CPU: 9 PID: 199 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]" <- Your copy of rtl8xxxu was probably missing this line:

    .wake_tx_queue = ieee80211_handle_wake_tx_queue,

It's required since kernel 6.2 and if it's not there you only get this warning with no explanation.

ZerBea commented 1 year ago

Looks like one of the last commits broke the driver again (also on kernel 6.3-rc3).

ZerBea commented 1 year ago

BTW: rtl8xxxu: probe of 3-1.1.2:1.0 failed with error -12 returned after a git pull to latest git head:

[ 5251.620300] usb 3-1.1.2: new high-speed USB device number 15 using xhci_hcd
[ 5251.815837] usb 3-1.1.2: New USB device found, idVendor=0bda, idProduct=8179, bcdDevice= 0.00
[ 5251.815847] usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5251.815851] usb 3-1.1.2: Product: 802.11n NIC
[ 5251.815854] usb 3-1.1.2: Manufacturer: Realtek
[ 5251.816559] ------------[ cut here ]------------
[ 5251.816562] WARNING: CPU: 2 PID: 3248 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[ 5251.816686] Modules linked in: rtl8xxxu(OE) snd_seq_dummy snd_seq snd_seq_device mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 nfnetlink_queue nfnetlink_log nfnetlink bluetooth ecdh_generic 8021q garp mrp stp llc nvidia_drm(POE) nvidia_uvm(POE) nvidia_modeset(POE) joydev mousedev nvidia(POE) intel_rapl_msr intel_rapl_common edac_mce_amd ccp snd_hda_codec_realtek snd_hda_codec_generic kvm ledtrig_audio nls_iso8859_1 snd_hda_codec_hdmi irqbypass vfat snd_hda_intel crct10dif_pclmul fat crc32_pclmul snd_intel_dspcfg polyval_clmulni snd_intel_sdw_acpi polyval_generic mt7601u gf128mul ghash_clmulni_intel snd_hda_codec ppdev sha512_ssse3 r8169 aesni_intel snd_hda_core mac80211 crypto_simd snd_hwdep cryptd wmi_bmof realtek snd_pcm rapl sp5100_tco mdio_devres snd_timer gpio_amdpt libarc4 parport_pc snd pcspkr k10temp libphy video i2c_piix4 soundcore parport gpio_generic cfg80211 acpi_cpufreq mac_hid rfkill sg crypto_user fuse dm_mod loop bpf_preload ip_tables x_tables usbhid ext4
[ 5251.816793]  crc32c_generic crc16 mbcache jbd2 nvme mxm_wmi nvme_core sr_mod crc32c_intel xhci_pci cdrom xhci_pci_renesas nvme_common wmi
[ 5251.816810] Unloaded tainted modules: rtl8xxxu(OE):1 [last unloaded: rtl8xxxu(OE)]
[ 5251.816817] CPU: 2 PID: 3248 Comm: kworker/2:0 Tainted: P           OE      6.2.7-arch1-1 #1 d0ef1d2ba4aa7f22be04df39dde66a4c3cc73dc4
[ 5251.816823] Hardware name: Micro-Star International Co., Ltd. MS-7A33/X370 KRAIT GAMING (MS-7A33), BIOS 1.F0 11/06/2018
[ 5251.816827] Workqueue: usb_hub_wq hub_event
[ 5251.816835] RIP: 0010:ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
[ 5251.816947] Code: be 80 00 00 00 00 74 22 48 83 be e8 02 00 00 00 74 18 48 83 be 38 01 00 00 00 74 2b 48 83 be 08 01 00 00 00 74 17 0f 0b eb 02 <0f> 0b 45 31 e4 5b 5d 4c 89 e0 41 5c 41 5d e9 ba 4e 30 c3 48 83 be
[ 5251.816951] RSP: 0018:ffffb8498eb33870 EFLAGS: 00010246
[ 5251.816956] RAX: 0000000000010003 RBX: ffffffffc1393b60 RCX: 0000000000008179
[ 5251.816959] RDX: 0000000000000000 RSI: ffffffffc13946c0 RDI: 00000000000007f8
[ 5251.816962] RBP: ffffffffc13946c0 R08: 0000000000000000 R09: ffff898b401e0310
[ 5251.816965] R10: ffff898bbd6a74a0 R11: 0000000000000000 R12: ffffffffc1393b60
[ 5251.816967] R13: ffffffffc13ab710 R14: ffff898b75cf3000 R15: ffff898b71c0d000
[ 5251.816970] FS:  0000000000000000(0000) GS:ffff898e4ee80000(0000) knlGS:0000000000000000
[ 5251.816974] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5251.816977] CR2: 00007fdb2c5ecacc CR3: 000000010c692000 CR4: 00000000003506e0
[ 5251.816980] Call Trace:
[ 5251.816983]  <TASK>
[ 5251.816988]  rtl8xxxu_probe+0xb6/0x2130 [rtl8xxxu df2fc8a4d98006fd8bf059729e6e8791775a3fb6]
[ 5251.817021]  ? __pm_runtime_set_status+0x1a9/0x340
[ 5251.817031]  usb_probe_interface+0xe6/0x2f0
[ 5251.817039]  really_probe+0x1b9/0x410
[ 5251.817045]  __driver_probe_device+0x78/0x170
[ 5251.817050]  driver_probe_device+0x1f/0x90
[ 5251.817054]  __device_attach_driver+0x89/0x110
[ 5251.817059]  ? __pfx___device_attach_driver+0x10/0x10
[ 5251.817063]  bus_for_each_drv+0x8f/0xe0
[ 5251.817070]  __device_attach+0xb2/0x1e0
[ 5251.817075]  bus_probe_device+0x92/0xb0
[ 5251.817082]  device_add+0x413/0x8b0
[ 5251.817088]  usb_set_configuration+0x5c6/0x950
[ 5251.817095]  usb_generic_driver_probe+0x5c/0x90
[ 5251.817103]  usb_probe_device+0x3d/0x110
[ 5251.817109]  really_probe+0x1b9/0x410
[ 5251.817113]  __driver_probe_device+0x78/0x170
[ 5251.817118]  driver_probe_device+0x1f/0x90
[ 5251.817122]  __device_attach_driver+0x89/0x110
[ 5251.817126]  ? __pfx___device_attach_driver+0x10/0x10
[ 5251.817130]  bus_for_each_drv+0x8f/0xe0
[ 5251.817137]  __device_attach+0xb2/0x1e0
[ 5251.817141]  bus_probe_device+0x92/0xb0
[ 5251.817148]  device_add+0x413/0x8b0
[ 5251.817154]  usb_new_device+0x28e/0x4e0
[ 5251.817160]  hub_event+0x12ce/0x1c60
[ 5251.817169]  process_one_work+0x1c8/0x3c0
[ 5251.817178]  worker_thread+0x51/0x390
[ 5251.817184]  ? __pfx_worker_thread+0x10/0x10
[ 5251.817190]  kthread+0xde/0x110
[ 5251.817194]  ? __pfx_kthread+0x10/0x10
[ 5251.817199]  ret_from_fork+0x2c/0x50
[ 5251.817209]  </TASK>
[ 5251.817211] ---[ end trace 0000000000000000 ]---
[ 5251.817215] rtl8xxxu: probe of 3-1.1.2:1.0 failed with error -12
ZerBea commented 1 year ago

Removed this driver $ sudo rmmod rtl8xxxu.ko

and going back to the stock driver kernel 6.3rc3 $ sudo insmod rtl8xxxu.ko

[ 5552.047504] usb 3-1.1.2: New USB device found, idVendor=0bda, idProduct=8179, bcdDevice= 0.00
[ 5552.047514] usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5552.047519] usb 3-1.1.2: Product: 802.11n NIC
[ 5552.047522] usb 3-1.1.2: Manufacturer: Realtek
[ 5552.102435] usb 3-1.1.2: Vendor: Realtek
[ 5552.102440] usb 3-1.1.2: Product: \x03802.11n NI
[ 5552.102442] usb 3-1.1.2: Serial: \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff
[ 5552.102444] usb 3-1.1.2: RTL8188EU rev D (TSMC) romver 0, 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[ 5552.102449] usb 3-1.1.2: RTL8188EU MAC: 00:c0:ca:b0:67:e9
[ 5552.102452] usb 3-1.1.2: rtl8xxxu: Loading firmware rtlwifi/rtl8188eufw.bin
[ 5552.105358] usb 3-1.1.2: Firmware revision 11.1 (signature 0x88e1)
[ 5552.589434] rtl8xxxu 3-1.1.2:1.0 wlp39s0f3u1u1u2: renamed from wlan0

everything is fine.

dubhater commented 1 year ago

[ 5552.102440] usb 3-1.1.2: Product: \x03802.11n NI [ 5552.102442] usb 3-1.1.2: Serial: \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff

Hmm, it's not reading those correctly. Can you insert the module again with debug=0x2000 parameter and paste the efuse dump, please?

ZerBea commented 1 year ago

kernel 6.3-rc3 stock driver:

$ sudo insmod rtl8xxxu.ko debug=0x2000
[ 3422.712413] usb 3-1.1.2: new high-speed USB device number 15 using xhci_hcd
[ 3422.903740] usb 3-1.1.2: New USB device found, idVendor=0bda, idProduct=8179, bcdDevice= 0.00
[ 3422.903750] usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3422.903754] usb 3-1.1.2: Product: 802.11n NIC
[ 3422.903757] usb 3-1.1.2: Manufacturer: Realtek
[ 3422.972936] usb 3-1.1.2: Vendor: Realtek
[ 3422.972941] usb 3-1.1.2: Product: \x03802.11n NI
[ 3422.972944] usb 3-1.1.2: Serial: \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff
[ 3422.972946] usb 3-1.1.2: Dumping efuse for RTL8188EU (0x200 bytes):
[ 3422.972950] 00000000: 29 81 00 6c 0b 00 00 00 00 0c 00 00 00 00 ff ff  )..l............
[ 3422.972953] 00000010: 25 24 23 22 22 22 28 28 26 23 23 11 ff ff ff ff  %$#"""((&##.....
[ 3422.972956] 00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972958] 00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972960] 00000040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972962] 00000050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972964] 00000060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972966] 00000070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972967] 00000080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972969] 00000090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972971] 000000a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972973] 000000b0: ff ff ff ff ff ff ff ff 20 20 1a 00 00 00 00 00  ........  ......
[ 3422.972975] 000000c0: 00 00 00 10 00 00 00 00 00 03 ff ff ff ff ff ff  ................
[ 3422.972977] 000000d0: da 0b 79 81 43 66 00 00 c0 ca b0 67 e9 0a 03 52  ..y.Cf.....g...R
[ 3422.972979] 000000e0: 65 61 6c 74 65 6b 0d 0d 03 38 30 32 2e 31 31 6e  ealtek...802.11n
[ 3422.972981] 000000f0: 20 4e 49 43 ff ff ff ff ff ff ff ff ff ff ff ff   NIC............
[ 3422.972983] 00000100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972984] 00000110: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972986] 00000120: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972988] 00000130: 81 ae 96 2d 03 93 96 11 fc 8c 00 11 9b ff ff ff  ...-............
[ 3422.972990] 00000140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972992] 00000150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972994] 00000160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972996] 00000170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972997] 00000180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.972999] 00000190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.973001] 000001a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.973003] 000001b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.973005] 000001c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.973007] 000001d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.973008] 000001e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.973010] 000001f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
[ 3422.973012] usb 3-1.1.2: RTL8188EU rev D (TSMC) romver 0, 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[ 3422.973018] usb 3-1.1.2: RTL8188EU MAC: 00:c0:ca:b0:67:e9
[ 3422.973021] usb 3-1.1.2: rtl8xxxu: Loading firmware rtlwifi/rtl8188eufw.bin
[ 3422.975961] usb 3-1.1.2: Firmware revision 11.1 (signature 0x88e1)
[ 3423.485546] rtl8xxxu 3-1.1.2:1.0 wlp39s0f3u1u1u2: renamed from wlan0
ZerBea commented 1 year ago

This driver here died straight after reading reading the manufacturer:

[ 3308.027161] usb 3-1.1.2: new high-speed USB device number 14 using xhci_hcd
[ 3308.218577] usb 3-1.1.2: New USB device found, idVendor=0bda, idProduct=8179, bcdDevice= 0.00
[ 3308.218586] usb 3-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3308.218590] usb 3-1.1.2: Product: 802.11n NIC
[ 3308.218593] usb 3-1.1.2: Manufacturer: Realtek
[ 3308.219850] ------------[ cut here ]------------
[ 3308.219854] WARNING: CPU: 2 PID: 2757 at net/mac80211/main.c:631 ieee80211_alloc_hw_nm+0x67/0x6a0 [mac80211]
ZerBea commented 1 year ago

reported the bug of the stock driver on bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=217231

dubhater commented 1 year ago

Thanks for the report.

ZerBea commented 1 year ago

Looks like that last commit fixed this:

[14965.138295] usbcore: registered new interface driver rtl8xxxu
[14967.349207] usb 5-1.1.1: USB disconnect, device number 10
[14968.926098] usb 5-1.1.2: new high-speed USB device number 11 using xhci_hcd
[14969.116275] usb 5-1.1.2: New USB device found, idVendor=7392, idProduct=b811, bcdDevice= 0.00
[14969.116280] usb 5-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14969.116282] usb 5-1.1.2: Product: Edimax N150 Adapter
[14969.116283] usb 5-1.1.2: Manufacturer: Realtek
[14969.116284] usb 5-1.1.2: SerialNumber: 08BEAC305ACF
[14969.195808] usb 5-1.1.2: RTL8188EU rev D (TSMC) romver 0, 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0
[14969.195815] usb 5-1.1.2: RTL8188EU MAC: 08:be:ac:30:5a:cf
[14969.195818] usb 5-1.1.2: rtl8xxxu: Loading firmware rtlwifi/rtl8188eufw.bin
[14969.204286] usb 5-1.1.2: Firmware revision 11.1 (signature 0x88e1)
[14969.682201] rtl8xxxu 5-1.1.2:1.0 wlp39s0f3u1u1u2: renamed from wlan0
$ hcxdumptool -L

Requesting interface capabilities. This may take some time.
Please be patient...

available wlan devices:

phy idx hw-mac       virtual-mac  m ifname           driver (protocol)
---------------------------------------------------------------------------------------------
  1   4 08beac304acf 08beac304acf + wlp39s0f3u1u1u2  rtl8xxxu (NETLINK & WIRELESS EXTENSIONS)

* active monitor mode available
+ monitor mode available
- no monitor mode available

bye-bye
$ hcxdumptool -I wlp39s0f3u1u1u2

Requesting interface capabilities. This may take some time.
Please be patient...

interface information:

phy idx hw-mac       virtual-mac  m ifname           driver (protocol)
---------------------------------------------------------------------------------------------
  1   4 08beac304acf 08beac304acf + wlp39s0f3u1u1u2  rtl8xxxu (NETLINK & WIRELESS EXTENSIONS)

available frequencies: frequency [channel] tx-power of Regulatory Domain: DE

  2412 [  1] 20.0 dBm     2417 [  2] 20.0 dBm     2422 [  3] 20.0 dBm     2427 [  4] 20.0 dBm
  2432 [  5] 20.0 dBm     2437 [  6] 20.0 dBm     2442 [  7] 20.0 dBm     2447 [  8] 20.0 dBm
  2452 [  9] 20.0 dBm     2457 [ 10] 20.0 dBm     2462 [ 11] 20.0 dBm     2467 [ 12] 20.0 dBm
  2472 [ 13] 20.0 dBm     2484 [ 14] disabled

bye-bye