FS#14141 - [kernel26] rtl8187 driver slow upload bug in kernel 2.6.29 and up

Attached to Project: Arch Linux
Opened by christopher rogers (godane) - Wednesday, 08 April 2009, 20:16 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 05 October 2009, 16:39 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

There is slow upload bug in driver rtl8187. I don't know why but here is my output in dmesg on 2.6.28.8:

arch@arch-live log $ cat dmesg.log | grep rtl8187
usbcore: registered new interface driver rtl8187

kernel 2.6.29.1-3 dmesg log:
arch@arch-live ~ $ cat /var/log/dmesg.log | grep rtl8187
wmaster0 (rtl8187): not using net_device_ops yet
wlan0 (rtl8187): not using net_device_ops yet
usbcore: registered new interface driver rtl8187

i don't know what this means but i have slower upload speed with new kernel cause of it.

Additional info:
kernel 2.6.29.1-3
but its in all 2.6.29 builds that i try so far
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Monday, 05 October 2009, 16:39 GMT
Reason for closing:  Upstream
Additional comments about closing:  Upstream. Please report to upstream if not already solved/reported.
Comment by christopher rogers (godane) - Thursday, 09 April 2009, 05:07 GMT
I have a update about the bug i think.
iwconfig wlan0 on kernel 2.6.28.8:

wlan0 IEEE 802.11bg ESSID:"linksys"
Mode:Managed Frequency:2.437 GHz Access Point: 00:18:F8:42:56:0F
Bit Rate=11 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality=16/100 Signal level:65/65
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

iwconfig wlan0 on kernel 2.6.29.1-3:

wlan0 IEEE 802.11bg ESSID:"linksys"
Mode:Managed Frequency:2.437 GHz Access Point: 00:18:F8:42:56:0F
Bit Rate=11 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality=31/100 Signal level:-69 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

I hope this helps.
Comment by Tobias Powalowski (tpowa) - Thursday, 09 April 2009, 07:51 GMT
Please report upstream.
Comment by christopher rogers (godane) - Thursday, 09 April 2009, 17:50 GMT
I may have made a break in this bug. We change the 'Rate control algorithm' to mistrel. In the older kernel it was pid.

I will recompile the kernel with pid 'Rate control algorithm' to see if it fixes the problem.
Comment by Thomas Bächler (brain0) - Thursday, 09 April 2009, 18:51 GMT
To my knowledge, only minstrel is supported upstream these days.
Comment by christopher rogers (godane) - Thursday, 09 April 2009, 19:51 GMT
I found that out too. Sorry. Thought/hoped it was a simple fix in the config.
Comment by christopher rogers (godane) - Saturday, 25 April 2009, 19:01 GMT
I think i may have found something. It maybe a a usb bug.

in kernel 2.6.28:
Mar 25 12:37:33 arch-live kernel: usbcore: deregistering interface driver rtl8187
Mar 25 12:37:33 arch-live kernel: r8169: eth0: link down
Mar 25 12:37:33 arch-live kernel: phy1: Selected rate control algorithm 'pid'
Mar 25 12:37:33 arch-live kernel: phy1: hwaddr 00:18:4d:5f:d8:7f, RTL8187vB (default) V1 + rtl8225z2
Mar 25 12:37:33 arch-live kernel: usbcore: registered new interface driver rtl8187

in kernel 2.6.29:
Apr 22 01:14:34 arch-live kernel: usbcore: deregistering interface driver rtl8187
Apr 22 01:14:34 arch-live kernel: r8169: eth0: link down
Apr 22 01:14:34 arch-live kernel: usb 1-6: reset high speed USB device using ehci_hcd and address 3
Apr 22 01:14:35 arch-live kernel: wmaster0 (rtl8187): not using net_device_ops yet
Apr 22 01:14:35 arch-live kernel: phy1: Selected rate control algorithm 'minstrel'
Apr 22 01:14:35 arch-live kernel: wlan0 (rtl8187): not using net_device_ops yet
Apr 22 01:14:35 arch-live kernel: phy1: hwaddr 00:18:4d:5f:d8:7f, RTL8187vB (default) V1 + rtl8225z2
Apr 22 01:14:35 arch-live kernel: usbcore: registered new interface driver rtl8187

You will notice that its when reset high speed usb device that the net_device_ops happen. This doesn't happen in kernel 2.6.28.

PS. I forgot to tell you guys that i'm using netgear wg111v2 USB. Its build with a rtl8187 chip in it.
Comment by Thomas Bächler (brain0) - Saturday, 25 April 2009, 19:37 GMT
I think I had the net_device_ops message too in 2.6.29 with iwl3945 (it's gone in .30)
Comment by christopher rogers (godane) - Thursday, 30 April 2009, 21:15 GMT
2.6.30-rc3 doesn't fix my upload bug. :(
Comment by christopher rogers (godane) - Friday, 01 May 2009, 20:40 GMT
Good news everyone!!!

I found a fix. I have reversed 8 patches for rtl8187 and got it my upload back to where it should be.

I going to try to narrow it down since the first for 4 patches i try didn't do anything to fix it i think.

there is are the last 4 by name in http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.29.y.git;a=summary
rtl8187: fix retry count passed in rtl8187_tx
rtl8187: Fix transmission count sent to mac80211
rtl8187: implement conf_tx callback to configure tx queues
rtl8187: fix 8187B throughput regression

I don't think i have to add all 8 back just these 4. Building another kernel with these 4 patchs reversed to see if upload works fine.
Comment by christopher rogers (godane) - Friday, 01 May 2009, 21:35 GMT
The last 4 patches i wrote about still fix the problem. So thats narrows it down to just 4 patches from 8. :)
Comment by christopher rogers (godane) - Sunday, 10 May 2009, 04:19 GMT
I couldn't fix the bug with reversing some patches. But i think the main problem is very high packet drops.

on kernel 2.6.28 with 'ping -c 40 google.com':
0% packets drop

on kenrel 2.6.29 with 'ping -c 40 google.com':
75% of the packets are dropped.

This may explain why there is a slow upload with rtl8187. With that high of a packet drop it will not be uploading very fast at all.
Comment by Tobias Powalowski (tpowa) - Sunday, 10 May 2009, 06:13 GMT
If you have such drops, it could be that you have to change the send/receive power.
I don't know if the module supports such a parameter, but that would be an idea.
Comment by christopher rogers (godane) - Sunday, 10 May 2009, 07:24 GMT
I got some good news. I got the packets to stop dropping. Its now 0%, Bad news is it didn't fix the upload problem to where is was before kernel 2.6.29.
code:
iwconfig wlan0 txpower off

I hope this helps.
Comment by christopher rogers (godane) - Sunday, 10 May 2009, 19:58 GMT
I used tcpdump today to see how many packets are dropped when i upload files.
code:
tcpdump -C 4 -B 128 -i wlan0

in kernel 2.6.29
5001 packets captured
8458 packets received by filter
3457 packets dropped by kernel

I come back later to so what it is on kernel 2.6.28.
Comment by christopher rogers (godane) - Sunday, 10 May 2009, 20:06 GMT
I just did it on kernel 2.6.28 now
code:
tcpdump -C 4 -B 128 -i wlan0

9933 packets captured
9933 packets received by filter
0 packets dropped by kernel

No packets are dropped on kernel 2.6.28. Don't know why this is happening but at least i know whats cause the upload speed drop now on kernel 2.6.29.
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 17 June 2009, 03:17 GMT
status with the 2.6.30?
Comment by christopher rogers (godane) - Wednesday, 17 June 2009, 08:05 GMT
The bug is still there.

Loading...