Bug 215201

Summary: r8188eu module
Product: Drivers Reporter: Glenn McCorkle (glennmcc)
Component: StagingAssignee: drivers_staging (drivers_staging)
Status: NEW ---    
Severity: normal CC: regressions
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.15.x, 5.16-rc3... 5.18.4, 5.18.5 Subsystem:
Regression: No Bisected commit-id:

Description Glenn McCorkle 2021-12-02 17:57:59 UTC
Starting with kernel version 5.15 through 5.15.6 and now even
with 5.16-rc3, this USB WiFi adapter tp-link model TL-WN725N
no-longer works with the r8188eu.ko module code currently being used.

There is a patch available for this kernel module...

/lib/modules/5.15.6/kernel/drivers/staging/r8188eu/r8188eu.ko

The patch is referenced here....

https://github.com/lwfinger/rtl8188eu/commit/373d98d270880554839136308b8a1861f80bd289

The full source code for the module can be downloaded via git.

git clone https://github.com/lwfinger/rtl8188eu

Compiling that SRC and installing the resulting module results
in restoration of full functionality of the adapter but of-course
with this warning message during boot-up....

[ 9.956994] 8188eu: loading out-of-tree module taints kernel.
Comment 1 Glenn McCorkle 2021-12-02 18:05:16 UTC
Here is the situation....

root@glennmcc-HP:~# uname -a
Linux glennmcc-HP.net 5.14.15 #1 SMP PREEMPT Wed Oct 27 12:41:02 CDT 2021 x86_64 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux

root@glennmcc-HP:~# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::523e:aaff:feb1:465d prefixlen 64 scopeid 0x20<link>
ether 50:3e:aa:b1:46:5d txqueuelen 1000 (Ethernet)
RX packets 271 bytes 29109 (28.4 KiB)
RX errors 0 dropped 65 overruns 0 frame 0
TX packets 15 bytes 1658 (1.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

____________________________________________________________________________________________________ ______________________________________________________

root@glennmcc-HP:~# uname -a
Linux glennmcc-HP.net 5.15.2 #1 SMP PREEMPT Fri Nov 12 11:44:33 CST 2021 x86_64 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux

root@glennmcc-HP:~# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 50:3e:aa:b1:46:5d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

____________________________________________________________________________________________________ _______________________________________________________

In both cases, the adapter is detected and its module is loaded....

[ 14.467964] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 14.526809] lib80211: common routines for IEEE802.11 drivers
[ 14.640761] r8188eu: module is from the staging directory, the quality is unknown, you have been warned.
[ 14.656175] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[ 14.702254] usbcore: registered new interface driver r8188eu
[ 14.740287] r8188eu 1-3:1.0 wlan125: renamed from wlan0
[ 14.757882] r8188eu 1-3:1.0 wlan1: renamed from wlan125
Initializing LVM (Logical Volume Manager):
____________________________________________________________________________________________________ _________________________________________________________
  	
OK, grabbed the code via 'git clone' and built the module with that patch in-place.



[ 9.956994] 8188eu: loading out-of-tree module taints kernel.
[ 9.976166] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[ 10.021397] EEPROM ID = 0x8129
[ 10.032386] usbcore: registered new interface driver r8188eu
[ 10.063184] r8188eu 1-3:1.0 wlan125: renamed from wlan0
[ 10.084222] r8188eu 1-3:1.0 wlan1: renamed from wlan125
Initializing LVM (Logical Volume Manager):
[ 10.782069] Adding 4225108k swap on /dev/sdb2. Priority:-2 extents:1 across:4225108k FS




Welcome to Linux 5.15.3 x86_64 (tty1)

glennmcc-HP login: root
Password:
Last login: Fri Nov 19 11:36:46 on tty1
Linux 5.15.3.


root@glennmcc-HP:~# uname -a
Linux glennmcc-HP.net 5.15.3 #1 SMP PREEMPT Thu Nov 18 14:35:01 CST 2021 x86_64 Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz GenuineIntel GNU/Linux


root@glennmcc-HP:~# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::523e:aaff:feb1:465d prefixlen 64 scopeid 0x20<link>
ether 50:3e:aa:b1:46:5d txqueuelen 1000 (Ethernet)
RX packets 86 bytes 9264 (9.0 KiB)
RX errors 0 dropped 31 overruns 0 frame 0
TX packets 17 bytes 1860 (1.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
_______________________________________________________________________________________
Comment 2 The Linux kernel's regression tracker (Thorsten Leemhuis) 2021-12-07 09:22:43 UTC
FWIW, sadly lot's of bugs filed in bugzilla.kernel.org don't reach the responsible developers. This seems to be the case here. You thus might want to report your problem by mail as described in this document, as explained on the front-page of bugzilla.kernel.org:
https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html

As this seems to be a regression you might want to CC the regressions mailing list on your report, as described in that document.
Comment 3 Glenn McCorkle 2021-12-07 18:34:57 UTC
Thanks for the comment & suggestion.

For my own purposes, it's now fixed on the one machine that uses
the tp-link model TL-WN725N USB WiFi adapter in-question.

It is now upgraded to kernel version 5.15.6 and using the
8188eu module built from the aforementioned code grabbed via git.
Comment 4 The Linux kernel's regression tracker (Thorsten Leemhuis) 2021-12-08 10:18:09 UTC
(In reply to Glenn McCorkle from comment #3)
> Thanks for the comment & suggestion.
> 
> For my own purposes, it's now fixed on the one machine that uses
> the tp-link model TL-WN725N USB WiFi adapter in-question.
> 
> It is now upgraded to kernel version 5.15.6 and using the
> 8188eu module built from the aforementioned code grabbed via git.

That makes me sad, as other will likely run into the problem if it's not properly reported. Another reason to report it properly: comping and maintaining external drivers in my experience often gets a hassle over time.
Comment 5 Glenn McCorkle 2021-12-08 16:08:08 UTC
No problem... email sent to....

To: stable@vger.kernel.org
CC: regressions@lists.linux.dev
Comment 6 Glenn McCorkle 2021-12-08 16:20:02 UTC
I _really_ hate SpamAssassin :(

Delivery to the following recipients failed permanently:

   * regressions@lists.linux.dev

Reason: There was an error while attempting to deliver your message with [Subject: "r8188eu kernel module..."] to regressions@lists.linux.dev. MTA p3plsmtpa11-09.prod.phx3.secureserver.net received this response from the destination host IP - 44.238.234.78 -  550 , 550 5.7.1 Blocked by SpamAssassin
Comment 7 Glenn McCorkle 2021-12-15 07:39:18 UTC
Well, I don't know exactly how but everything is now working again.
Comment 8 Glenn McCorkle 2022-06-17 15:45:46 UTC
Well.... 

it's been working perfectly all the way up to and including kernel v5.18.3
but now not working again with kernel v5.18.4 and v5.18.5

--- 5.18.3 ---
[   12.738036] hid: raw HID events driver (C) Jiri Kosina
[   12.751798] r8188eu: module is from the staging directory, the quality is unknown, you have been warned.
[   12.768424] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[   12.810156] EEPROM ID = 0x8129
[   12.821288] usbcore: registered new interface driver r8188eu
[   12.915474] usbcore: registered new interface driver usbhid
[   12.926082] usbhid: USB HID core driver
[   13.053338] r8188eu 1-3:1.0 wlan125: renamed from wlan0
[   13.071812] r8188eu 1-3:1.0 wlan1: renamed from wlan125
[   13.118911] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2:1.0/0003:046D:C077.0001/input/input11
Initializing LVM (Logical Volume Manager):
________________________________

--- 5.18.4 and 5.18.5 ---
[   14.138036] hid: raw HID events driver (C) Jiri Kosina
[   14.151798] r8188eu: module is from the staging directory, the quality is unknown, you have been warned.
[   14.168424] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[   14.210411] EEPROM ID = 0x8129
[   14.221064] r8188eu 1-3:1.0: _rtw_init_xmit_priv failed
[   14.332604] usbcore: registered new interface driver usbhid
[   14.343135] usbhid: USB HID core driver
[   14.353808] usb 1-3: reset high-speed USB device number 2 using ehci-pci
[   14.427592] input: Logitech USB Optical Mouse as /devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2:1.0/0003:046D:C077.0001/input/input11
[   14.438899] hid-generic 0003:046D:C077.0001: input,hidraw0: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-0000:00:1d.2-2/input0
[   14.492980] usbcore: registered new interface driver r8188eu
Initializing LVM (Logical Volume Manager):
____________________________________________________________________________________



Might this be the problem ?

still running on.... kernel-firmware-20220610
Comment 9 Glenn McCorkle 2022-06-17 17:39:04 UTC
Again the same as back in December.

Grabbed the code from https://github.com/lwfinger/rtl8188eu

Built and installed the module and firmware.

[   14.881808] 8188eu: loading out-of-tree module taints kernel.
[   14.905219] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[   14.954080] EEPROM ID = 0x8129
[   14.968487] usbcore: registered new interface driver r8188eu
[   15.013868] r8188eu 2-6:1.0 wlan125: renamed from wlan0
[   15.039056] r8188eu 2-6:1.0 wlan1: renamed from wlan125
Initializing LVM (Logical Volume Manager):
______________
Comment 10 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-06-18 12:50:37 UTC
(In reply to Glenn McCorkle from comment #8)
> [   14.221064] r8188eu 1-3:1.0: _rtw_init_xmit_priv failed

Problem is known, fix on the way: https://lore.kernel.org/all/YqB9siuACKQMKXhv@kroah.com/
Comment 11 Glenn McCorkle 2022-06-19 16:59:58 UTC
On Sat, 18 Jun 2022 12:50:37 +0000, bugzilla-daemon@kernel.org wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=215201

> --- Comment #10 from The Linux kernel's regression tracker (Thorsten Leemhu
> is) (regressions@leemhuis.info) ---
> (In reply to Glenn McCorkle from comment #8)
>> [   14.221064] r8188eu 1-3:1.0: _rtw_init_xmit_priv failed

> Problem is known, fix on the way:
> https://lore.kernel.org/all/YqB9siuACKQMKXhv@kroah.com/

> -- 

Thanks for the update.

Is this fix anticipated to be included in kernel v5.18.6 ?
Comment 12 The Linux kernel's regression tracker (Thorsten Leemhuis) 2022-06-19 17:01:01 UTC
(In reply to Glenn McCorkle from comment #11)

> Is this fix anticipated to be included in kernel v5.18.6 ?

Yes, as it can be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.18