Bug 2097526

Summary: tp-link wifi broken in latest kernels
Product: [Fedora] Fedora Reporter: Sammy <umar>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 36CC: acaringi, adscvr, airlied, alciregi, alex.apy39, bskeggs, dasergatskov, hdegoede, hpa, jarodwilson, jforbes, jglisse, jonathan, josef, jp-dev, kernel-maint, lgoncalv, linville, masami256, mchehab, nixuser, ptalbert, steved
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-5.18.6-200.fc36 kernel-5.18.6-100.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-25 01:11:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dmesg 5.18.5 none

Description Sammy 2022-06-15 21:20:32 UTC
On Fedora 36, kernel 5.17.15 and 5.18.4 (koji) the tp-link usb wifi adapter is not working. The diode does not light up and no wifi devices are reported.

Downgrading to 5.17.14 solves the problem. Thanks!

Comment 1 Kate Hsuan 2022-06-16 11:38:57 UTC
Hi Sammy,

Could you please provide the dmesg log (5.18.4) and model number of tp-link wifi NIC?

The dmesg log can be found using the following command
#dmesg > /tmp/dmesg-5.18.4.log

Thank you

Comment 2 Sammy 2022-06-16 13:28:39 UTC
Hi, the model is TP-Link Nano USB Wifi Dongle 150Mbps High Gain Wireless Network Adapter (TL-WN722N).
I will send the dmesg when I go home this afternoon.

Comment 3 Justin M. Forbes 2022-06-16 15:09:57 UTC
That should be the 8188eu driver, and the only change for that driver in 5.17.15 was: staging-r8188eu-add-check-for-kzalloc.patch I am curious if the patch is dependent on something else that was not backported, or if the patch itself is problematic. Can you give kernel-5.19.0-0.rc2.21.fc37 a try and see if the adapter works?

Comment 4 Sammy 2022-06-16 15:28:10 UTC
I see another patch "staging: r8188eu: fix struct rt_firmware_hdr" I am not sure this is part of kzalloc patch or not.
I will test those when I go home.

Comment 5 Justin M. Forbes 2022-06-16 18:56:30 UTC
(In reply to Sammy from comment #4)
> I see another patch "staging: r8188eu: fix struct rt_firmware_hdr" I am not
> sure this is part of kzalloc patch or not.
> I will test those when I go home.

That one is in 5.18.4, but not in 5.17.15.  If 5.17.15 is failing for you as the first comment mentioned, we can rule out that patch.

Comment 6 Sammy 2022-06-16 23:01:32 UTC
Created attachment 1890783 [details]
dmesg 5.18.5

Comment 7 Sammy 2022-06-16 23:03:36 UTC
Tested again with 5.17.14 and it works fine.

It does not work with 5.18.5-200 and 5.19.0-0.rc2.21.fc37.

I manually loaded the module "modprobe r8188eu" with these and it did not work despite.

Comment 8 Kate Hsuan 2022-06-17 07:45:22 UTC
Hi Sammy,

I found an error from the dmesg log.
[    6.173809] r8188eu 1-10.2:1.0: _rtw_init_xmit_priv failed

The driver tried to claim memory space using kzalloc and vzalloc but failed.

I had reverted the patch "staging: r8188eu: add check for kzalloc".
Once koji build is completed, I'll post the koji link to you and you could download and try this build and share the result with us.

Thank you :)

Comment 9 Kate Hsuan 2022-06-17 09:03:17 UTC
The packages can be found here https://koji.fedoraproject.org/koji/taskinfo?taskID=88348838

You could follow the steps shown in the following URL to install this build.
https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt

Comment 10 Sammy 2022-06-17 10:59:09 UTC
Yes, it works with the bz kernel. Thanks!

Comment 11 Ian Laurie 2022-06-18 00:39:15 UTC
kernel-5.18.5-200.bz2097526.fc36.x86_64 has got my TP-Link TL-WN725N (Bus 001 Device 002: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter) working again.

Comment 12 Justin M. Forbes 2022-06-18 01:55:48 UTC
I am glad that it is working, but 5.18.5 is literally a very small set of patches to deal with an x86 security issue, and should not have had any noticeable impact here. I am going to keep this open until we either have multiple people confirm that it is somehow working again, or we come to a proper fix.

Comment 13 Kate Hsuan 2022-06-18 03:08:53 UTC
(In reply to Justin M. Forbes from comment #12)
> I am glad that it is working, but 5.18.5 is literally a very small set of
> patches to deal with an x86 security issue, and should not have had any
> noticeable impact here. I am going to keep this open until we either have
> multiple people confirm that it is somehow working again, or we come to a
> proper fix.

commit 8ae7bf782eacad803f752c83a183393b0a67127b (staging: r8188eu: add check for kzalloc) is a small fix for Null pointer check. I reverted it and it works.
I would validate it again and also fix it upstream.

Comment 14 Dmytro 2022-06-18 06:45:30 UTC
I can also confirm that version 5.18.5-200.bz2097526.fc36.x86_64 has fixed my Asus USB-N10 Nano (Bus 002 Device 002: ID 0b05:18f0 ASUSTek Computer, Inc. Realtek 8188EUS [USB-N10 Nano])

Comment 15 Justin M. Forbes 2022-06-21 14:45:41 UTC
*** Bug 2099341 has been marked as a duplicate of this bug. ***

Comment 16 Justin M. Forbes 2022-06-21 14:46:34 UTC
It appears that a proper upstream fix for this is included in 5.18.6 when it ships.

Comment 17 Justin M. Forbes 2022-06-22 18:09:47 UTC
*** Bug 2100196 has been marked as a duplicate of this bug. ***

Comment 18 Sammy 2022-06-22 18:37:09 UTC
5.8.6 koji kernel works!

Comment 19 Sammy 2022-06-22 18:38:37 UTC
5.18.6

Comment 20 jp-dev 2022-06-22 18:40:48 UTC
The packages 5.18.5-200.bz2097526.fc36.x86_64 fixed the problem here also.

Comment 21 Fedora Update System 2022-06-22 20:38:43 UTC
FEDORA-2022-171766e457 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-171766e457

Comment 22 Fedora Update System 2022-06-22 20:38:45 UTC
FEDORA-2022-52d458c85a has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-52d458c85a

Comment 23 Ian Laurie 2022-06-22 21:42:39 UTC
My TP-Link TL-WN725N works out of the box again with kernel-5.18.6-200.fc36.x86_64.

Comment 24 Fedora Update System 2022-06-23 01:19:52 UTC
FEDORA-2022-52d458c85a has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-52d458c85a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-52d458c85a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 25 Fedora Update System 2022-06-23 03:16:56 UTC
FEDORA-2022-171766e457 has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-171766e457`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-171766e457

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 26 Justin M. Forbes 2022-06-24 12:27:14 UTC
*** Bug 2098368 has been marked as a duplicate of this bug. ***

Comment 27 Fedora Update System 2022-06-25 01:11:47 UTC
FEDORA-2022-52d458c85a has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 28 Fedora Update System 2022-06-25 01:42:22 UTC
FEDORA-2022-171766e457 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 29 Aleksander Podsiadły 2022-06-25 05:59:24 UTC
kernel 5.18.6-100.fc35 r8188eu works for me. :)