2008-11-05 02:02:10

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

--- On Tue, 4/11/08, Larry Finger <[email protected]> wrote:
> > Signed-off-by: Herton Ronaldo Krzesinski
> <[email protected]>
>
> Tested-by: Larry Finger <[email protected]>

I tried with this combo:

compat-wireless: master-2008-10-31
wireless-testing: v2.6.28-rc2-4239-gd80fe00

and applying the two patches on top, they applies cleanly and compile okay except for some warnings in a different module about missing symbols (<something>_sta) but the result dies very painfully with a kernel oops:
-------------
BUG: unable to handle kernel NULL pointer dereference at 0000000000000307
IP: [<ffffffffa0105988>] rtl8187_probe+0x7f/0x836 [rtl8187]
PGD 754c4067 PUD 751d5067 PMD 0
Oops: 0002 [1] SMP
CPU 0
Modules linked in: rtl8187(+) snd_page_alloc video firewire_ohci firewire_core shpchp pcspkr eeprom_93cx6 output ac battery joydev r8169 crc_itu_t soundcore
i2c_piix4 k8temp hwmon pata_atiixp radeon drm i2c_algo_bit i2c_core
Pid: 829, comm: modprobe Not tainted 2.6.27.4-73.fc10.x86_64 #1
RIP: 0010:[<ffffffffa0105988>] [<ffffffffa0105988>] rtl8187_probe+0x7f/0x836 [rtl8187]
RSP: 0018:ffff880074de1c48 EFLAGS: 00010246
RAX: ffffffffa0108520 RBX: ffff880074de1cd0 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffff8800754763c8 RDI: 0000000000000040
RBP: ffff880074de1d08 R08: 00000000000003e8 R09: ffff8800776ed868
R10: ffff8800754761c4 R11: 000000000000000a R12: 0000000000000000
R13: ffff8800754762e0 R14: 0000000000000038 R15: ffff880074958000
FS: 00007f5c8bef66f0(0000) GS:ffffffff8158a100(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000307 CR3: 0000000074dc6000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 829, threadinfo ffff880074de0000, task ffff880075420000)
Stack: ffff880074de1cb8 ffffffff8110d22f ffff880074de1c78 ffff880074de1c78
ffff88007402af50 ffff88007402af50 ffffffffa0108520 ffff88007487a000
ffff880074958000 ffffffff81031023 ffff880074de1ca8 ffffffff81353562
Call Trace:
[<ffffffff8110d22f>] ? sysfs_addrm_finish+0x69/0x20e
[<ffffffff81031023>] ? need_resched+0x1e/0x28
[<ffffffff81353562>] ? _cond_resched+0x9/0x38
[<ffffffff81353aee>] ? mutex_lock+0x22/0x33
[<ffffffff81240d08>] ? usb_match_one_id+0x2b/0x88
[<ffffffff812412df>] ? usb_autopm_do_device+0xc8/0xd4
[<ffffffff812418b5>] usb_probe_interface+0x10e/0x14b
[<ffffffff811f64c4>] driver_probe_device+0xc0/0x16e
[<ffffffff811f65c1>] __driver_attach+0x4f/0x79
[<ffffffff811f6572>] ? __driver_attach+0x0/0x79
[<ffffffff811f5d57>] bus_for_each_dev+0x4f/0x89
[<ffffffff811f630f>] driver_attach+0x1c/0x1e
[<ffffffff811f5677>] bus_add_driver+0xb7/0x201
[<ffffffff811f67b0>] driver_register+0xa8/0x128
[<ffffffff81241aff>] usb_register_driver+0x80/0xe4
[<ffffffffa00bb000>] ? rtl8187_init+0x0/0x20 [rtl8187]
[<ffffffffa00bb01e>] rtl8187_init+0x1e/0x20 [rtl8187]
[<ffffffff8100a047>] do_one_initcall+0x47/0x12e
[<ffffffff81065be1>] sys_init_module+0xa9/0x1b6
[<ffffffff8101024a>] system_call_fastpath+0x16/0x1b


Code: 24 e1 e9 98 07 00 00 48 81 eb 88 00 00 00 48 89 5d 80 4c 8b 60 40 48 8d 5d c8 48 8b 85 70 ff ff ff 4d 8d 74 24 38 48 83 78 10 01 <41> 0f 94 84 24 07 03
00 00 48 8b 85 78 ff ff ff 49 8b 55 28 48
RIP [<ffffffffa0105988>] rtl8187_probe+0x7f/0x836 [rtl8187]
RSP <ffff880074de1c48>
CR2: 0000000000000307
---[ end trace aed852fa39b00f8c ]---
---------


Hin-Tak






Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

On Wednesday 05 November 2008 00:02:07 Hin-Tak Leung wrote:
> --- On Tue, 4/11/08, Larry Finger <[email protected]> wrote:
> > > Signed-off-by: Herton Ronaldo Krzesinski
> >
> > <[email protected]>
> >
> > Tested-by: Larry Finger <[email protected]>
>
> I tried with this combo:
>
> compat-wireless: master-2008-10-31
> wireless-testing: v2.6.28-rc2-4239-gd80fe00
>
> and applying the two patches on top, they applies cleanly and compile okay
> except for some warnings in a different module about missing symbols
> (<something>_sta) but the result dies very painfully with a kernel oops:

Looks like something bad in combination of compat-wireless plus kernel
2.6.27.4-73.fc10.x86_64, please try a plain wireless-testing tree with the
two patches.

> -------------
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000307
> IP: [<ffffffffa0105988>] rtl8187_probe+0x7f/0x836 [rtl8187]
> PGD 754c4067 PUD 751d5067 PMD 0
> Oops: 0002 [1] SMP
> CPU 0
> Modules linked in: rtl8187(+) snd_page_alloc video firewire_ohci
> firewire_core shpchp pcspkr eeprom_93cx6 output ac battery joydev r8169
> crc_itu_t soundcore i2c_piix4 k8temp hwmon pata_atiixp radeon drm
> i2c_algo_bit i2c_core Pid: 829, comm: modprobe Not tainted
> 2.6.27.4-73.fc10.x86_64 #1
> RIP: 0010:[<ffffffffa0105988>] [<ffffffffa0105988>]
> rtl8187_probe+0x7f/0x836 [rtl8187] RSP: 0018:ffff880074de1c48 EFLAGS:
> 00010246
> RAX: ffffffffa0108520 RBX: ffff880074de1cd0 RCX: 0000000000000001
> RDX: 0000000000000000 RSI: ffff8800754763c8 RDI: 0000000000000040
> RBP: ffff880074de1d08 R08: 00000000000003e8 R09: ffff8800776ed868
> R10: ffff8800754761c4 R11: 000000000000000a R12: 0000000000000000
> R13: ffff8800754762e0 R14: 0000000000000038 R15: ffff880074958000
> FS: 00007f5c8bef66f0(0000) GS:ffffffff8158a100(0000)
> knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> CR2: 0000000000000307 CR3: 0000000074dc6000 CR4: 00000000000006e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process modprobe (pid: 829, threadinfo ffff880074de0000, task
> ffff880075420000) Stack: ffff880074de1cb8 ffffffff8110d22f
> ffff880074de1c78 ffff880074de1c78 ffff88007402af50 ffff88007402af50
> ffffffffa0108520 ffff88007487a000 ffff880074958000 ffffffff81031023
> ffff880074de1ca8 ffffffff81353562 Call Trace:
> [<ffffffff8110d22f>] ? sysfs_addrm_finish+0x69/0x20e
> [<ffffffff81031023>] ? need_resched+0x1e/0x28
> [<ffffffff81353562>] ? _cond_resched+0x9/0x38
> [<ffffffff81353aee>] ? mutex_lock+0x22/0x33
> [<ffffffff81240d08>] ? usb_match_one_id+0x2b/0x88
> [<ffffffff812412df>] ? usb_autopm_do_device+0xc8/0xd4
> [<ffffffff812418b5>] usb_probe_interface+0x10e/0x14b
> [<ffffffff811f64c4>] driver_probe_device+0xc0/0x16e
> [<ffffffff811f65c1>] __driver_attach+0x4f/0x79
> [<ffffffff811f6572>] ? __driver_attach+0x0/0x79
> [<ffffffff811f5d57>] bus_for_each_dev+0x4f/0x89
> [<ffffffff811f630f>] driver_attach+0x1c/0x1e
> [<ffffffff811f5677>] bus_add_driver+0xb7/0x201
> [<ffffffff811f67b0>] driver_register+0xa8/0x128
> [<ffffffff81241aff>] usb_register_driver+0x80/0xe4
> [<ffffffffa00bb000>] ? rtl8187_init+0x0/0x20 [rtl8187]
> [<ffffffffa00bb01e>] rtl8187_init+0x1e/0x20 [rtl8187]
> [<ffffffff8100a047>] do_one_initcall+0x47/0x12e
> [<ffffffff81065be1>] sys_init_module+0xa9/0x1b6
> [<ffffffff8101024a>] system_call_fastpath+0x16/0x1b
>
>
> Code: 24 e1 e9 98 07 00 00 48 81 eb 88 00 00 00 48 89 5d 80 4c 8b 60 40 48
> 8d 5d c8 48 8b 85 70 ff ff ff 4d 8d 74 24 38 48 83 78 10 01 <41> 0f 94 84
> 24 07 03 00 00 48 8b 85 78 ff ff ff 49 8b 55 28 48
> RIP [<ffffffffa0105988>] rtl8187_probe+0x7f/0x836 [rtl8187]
> RSP <ffff880074de1c48>
> CR2: 0000000000000307
> ---[ end trace aed852fa39b00f8c ]---
> ---------
>
>
> Hin-Tak

--
[]'s
Herton

2008-11-06 00:00:17

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

--- On Wed, 5/11/08, Herton Ronaldo Krzesinski <[email protected]> wrote:
Tested-by Hin-Tak Leung <[email protected]>

Okay, I managed to patch compat-wireless and install it (with 2.6.27.4-24.fc9.x86_64 which has mac80211 as a module, not compiled-in).

I am having the stuck-at-1Mb problem, so rate control does not work.

Before installing compat-wireless, I think the rate started at 36Mb and moves up to 54Mb and get stuck at 54Mb as soon as any traffic is getting through; after installing the patched compat-wireless, the rate changes beteen 1Mb and 9Mb for a bit but get stuck at 1Mb as soon as any substantial traffic is getting through. I can manually switch it with "iwconfig wlan2 rate 36M", for example, but with an auto, "iwconfig wlan2 rate 36M auto", it drops back to 1Mb very soon.

Baring changes in the rest of the wireless stack (which might come to the same thing), it is probably the changes surrounding status.rate[0].count vs status.retry_count which causes the 1Mb-rate-stuck...

Did Larry get the v2 patches to do rate-control working (i.e. the rate actually changing with demand), or not? Larry's reply was "the rate-control mechanism works the way it did before" - I am not sure about the "it did" bit - same as v1 (rate stuck at 1Mb) or same as the prototype patch for 2.6.27 (rate changing with demand)?

Hin-Tak





2008-11-05 22:12:53

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

--- On Wed, 5/11/08, Herton Ronaldo Krzesinski <[email protected]> wrote:

> Don't know about fc10 kernel, but the changes also
> include mac80211.ko

Yes, I know the change includes mac802111.ko, that's why I was surprised that mac80211.ko didn't get built with compat-wireless.

Turned out that fc10 kernels have mac80211 built-in rather than as modules, so there is no way of replacing them with compat-wireless. I am going to install a 2.6.27.x-fc9... (I am using a 2.6.27.x-fc10 for some x11-xorg drivers because there wasn't a 2.6.27.x-fc9 when I looked - and the first 2.6.27-x.fc9 has just hit koji).

I'll fill a bug in redhat's bugzilla. :-).




Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

On Wednesday 05 November 2008 15:11:40 Hin-Tak Leung wrote:
> Herton Ronaldo Krzesinski wrote:
> >> and applying the two patches on top, they applies cleanly and compile
> >> okay except for some warnings in a different module about missing
> >> symbols (<something>_sta) but the result dies very painfully with a
> >> kernel oops:
> >
> > Looks like something bad in combination of compat-wireless plus kernel
> > 2.6.27.4-73.fc10.x86_64, please try a plain wireless-testing tree with
> > the two patches.
>
> Hmm, I'll have to check, but I was a bit puzzled that compat-wireless
> didn't build the mac80211 module and the fc10 kernel didn't have one
> either. (and early kernels have a mac80211.ko). Has this been made
> obsolete, or did the fc10 kernel shipped it compiled-in and for some
> good/bad reason compat-wireless doesn't build modules that are compiled in?
> (obviously there is no point in building a module the older version of
> which is compiled in since it won't be used...)
>
> The status.retry_count vs status.rate[0].count change must be in
> mac80211.ko or some other more generic module?

Don't know about fc10 kernel, but the changes also include mac80211.ko

>
> Hin-Tak
> P.S. I know building a whole wireless-testing kernel is the way to go, but
> it takes *very long*...

--
[]'s
Herton

2008-11-05 22:43:31

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

On Wed, Nov 05, 2008 at 02:05:31PM -0800, Hin-Tak Leung wrote:
> --- On Wed, 5/11/08, Herton Ronaldo Krzesinski <[email protected]> wrote:
>
> > Don't know about fc10 kernel, but the changes also
> > include mac80211.ko
>
> Yes, I know the change includes mac802111.ko, that's why I was surprised that mac80211.ko didn't get built with compat-wireless.
>
> Turned out that fc10 kernels have mac80211 built-in rather than as modules, so there is no way of replacing them with compat-wireless.

Umm I have an FC10 box and I see a mac80211.ko. But of course, I have an
early release of FC10, its on 2.6.27-0.244.rc2.git1.fc10.x86_64.

Did the new ones really put it built in?

Luis

2008-11-05 23:16:44

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

--- On Wed, 5/11/08, Luis R. Rodriguez <[email protected]> wrote:
> Umm I have an FC10 box and I see a mac80211.ko. But of
> course, I have an
> early release of FC10, its on
> 2.6.27-0.244.rc2.git1.fc10.x86_64.
>
> Did the new ones really put it built in?

Yes,
$ grep 'MAC80211=' /boot/config-2.6.2*fc10*
/boot/config-2.6.27.4-69.fc10.x86_64:CONFIG_MAC80211=y
/boot/config-2.6.27.4-73.fc10.x86_64:CONFIG_MAC80211=y

I looked through koji and found it was removed between
0.345.rc7.fc10
0.339.rc7.fc10
but the log entry between does not say why.

I filed this as https://bugzilla.redhat.com/show_bug.cgi?id=470143 ,
if John wants to grab it before somebody else assign it his way :-).

Hin-Tak










2008-11-06 00:18:29

by Larry Finger

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

Hin-Tak Leung wrote:
>
> Before installing compat-wireless, I think the rate started at 36Mb and moves up to 54Mb and get stuck at 54Mb as soon as any traffic is getting through; after installing the patched compat-wireless, the rate changes beteen 1Mb and 9Mb for a bit but get stuck at 1Mb as soon as any substantial traffic is getting through. I can manually switch it with "iwconfig wlan2 rate 36M", for example, but with an auto, "iwconfig wlan2 rate 36M auto", it drops back to 1Mb very soon.
>
> Baring changes in the rest of the wireless stack (which might come to the same thing), it is probably the changes surrounding status.rate[0].count vs status.retry_count which causes the 1Mb-rate-stuck...
>
> Did Larry get the v2 patches to do rate-control working (i.e. the rate actually changing with demand), or not? Larry's reply was "the rate-control mechanism works the way it did before" - I am not sure about the "it did" bit - same as v1 (rate stuck at 1Mb) or same as the prototype patch for 2.6.27 (rate changing with demand)?

On my system is started at 1 Mbs and rapidly moved to 54Mbs. It went so quickly
that by the time I started a ping, switched terminals, and issued an ivconfig,
it was already at 54 Mbs.

Larry

2008-11-05 17:10:50

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

Herton Ronaldo Krzesinski wrote:

>> and applying the two patches on top, they applies cleanly and compile okay
>> except for some warnings in a different module about missing symbols
>> (<something>_sta) but the result dies very painfully with a kernel oops:
>
> Looks like something bad in combination of compat-wireless plus kernel
> 2.6.27.4-73.fc10.x86_64, please try a plain wireless-testing tree with the
> two patches.

Hmm, I'll have to check, but I was a bit puzzled that compat-wireless didn't
build the mac80211 module and the fc10 kernel didn't have one either. (and early
kernels have a mac80211.ko). Has this been made obsolete, or did the fc10 kernel
shipped it compiled-in and for some good/bad reason compat-wireless doesn't
build modules that are compiled in? (obviously there is no point in building a
module the older version of which is compiled in since it won't be used...)

The status.retry_count vs status.rate[0].count change must be in mac80211.ko
or some other more generic module?

Hin-Tak
P.S. I know building a whole wireless-testing kernel is the way to go, but
it takes *very long*...



2008-11-06 01:02:24

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

--- On Thu, 6/11/08, Larry Finger <[email protected]> wrote:

> On my system is started at 1 Mbs and rapidly moved to
> 54Mbs. It went so quickly
> that by the time I started a ping, switched terminals, and
> issued an ivconfig,
> it was already at 54 Mbs.

Okay, I was writing too soon. My rate does go up and down now (pinging the other end of the wireless link, it varies between 12Mb to 36Mb). I don't know why it was stuck at 1Mb for a while earlier (10-20 minutes while I was doing a fair bit of web browsing, etc), nor why it is go up and down now :-(.

Hin-Tak





2008-11-06 14:31:09

by John W. Linville

[permalink] [raw]
Subject: Re: [RFC/RFT PATCH v2 2/2] rtl8187: feedback transmitted packets using tx close descriptor for 8187B

On Wed, Nov 05, 2008 at 11:16:42PM +0000, Hin-Tak Leung wrote:
> --- On Wed, 5/11/08, Luis R. Rodriguez <[email protected]> wrote:
> > Umm I have an FC10 box and I see a mac80211.ko. But of
> > course, I have an
> > early release of FC10, its on
> > 2.6.27-0.244.rc2.git1.fc10.x86_64.
> >
> > Did the new ones really put it built in?
>
> Yes,
> $ grep 'MAC80211=' /boot/config-2.6.2*fc10*
> /boot/config-2.6.27.4-69.fc10.x86_64:CONFIG_MAC80211=y
> /boot/config-2.6.27.4-73.fc10.x86_64:CONFIG_MAC80211=y
>
> I looked through koji and found it was removed between
> 0.345.rc7.fc10
> 0.339.rc7.fc10
> but the log entry between does not say why.
>
> I filed this as https://bugzilla.redhat.com/show_bug.cgi?id=470143 ,
> if John wants to grab it before somebody else assign it his way :-).

That decision was made against my advice -- I don't know that I can
change it.

John
--
John W. Linville Linux should be at the core
[email protected] of your literate lifestyle.