* ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255
@ 2008-10-23 22:12 Pavel Roskin
2008-10-24 1:33 ` [ath5k-devel] " Pavel Roskin
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2008-10-23 22:12 UTC (permalink / raw)
To: ath5k-devel; +Cc: wireless
Hello!
I'm seeing rare (approximately once an hour) reports of badness at
net/mac80211/rx.c:2200 with the current wireless-testing on a 32-bit
PowerPC machine.
Badness at /home/proski/src/linux-2.6/net/mac80211/rx.c:2200
NIP: c02ba388 LR: f104ae24 CTR: c02ba20c
REGS: c03c1cd0 TRAP: 0700 Not tainted (2.6.27-wl)
MSR: 00029032 <EE,ME,IR,DR> CR: 24004084 XER: 00000000
TASK = c03a1578[0] 'swapper' THREAD: c03c0000
GPR00: 0000000c c03c1d80 c03a1578 c18ac180 efb76b40 c03c1dd8 c1a46022 00000000
GPR08: 00000080 c18ac040 c18acdc8 000000ff 24004082 00000000 0171e9a8 000000db
GPR16: f1054868 f1054e8c 00000064 00008000 ea0ea0eb 00000000 c03c1dc8 c03c1dd8
GPR24: c18afdf0 efb0c0a8 c18afdc0 00000080 c18ac180 c03c1dd8 c18acce0 efb76b40
NIP [c02ba388] __ieee80211_rx+0x17c/0x638
LR [f104ae24] ath5k_tasklet_rx+0x2c8/0x5cc [ath5k]
Call Trace:
[c03c1d80] [2d89b700] 0x2d89b700 (unreliable)
[c03c1dc0] [f104ae24] ath5k_tasklet_rx+0x2c8/0x5cc [ath5k]
[c03c1e50] [c002e318] tasklet_action+0x80/0xfc
[c03c1e70] [c002ebf8] __do_softirq+0x8c/0xfc
[c03c1ea0] [c00062ac] do_softirq+0x58/0x5c
[c03c1eb0] [c002eaf8] irq_exit+0x84/0x88
[c03c1ec0] [c0006320] do_IRQ+0x70/0xc8
[c03c1ed0] [c00106fc] ret_from_except+0x0/0x14
--- Exception: 501 at cpu_idle+0xd8/0xe8
LR = cpu_idle+0xd8/0xe8
[c03c1f90] [c0009188] cpu_idle+0x54/0xe8 (unreliable)
[c03c1fb0] [c02c2acc] __got2_end+0x58/0x68
[c03c1fc0] [c0371754] start_kernel+0x26c/0x2c8
[c03c1ff0] [00003438] 0x3438
Instruction dump:
6c09ffff 2f898800 419e0244 80010044 7f83e378 7f04c378 7fa5eb78 7ea6ab78
baa10014 7c0803a6 38210040 4bfff4d4 <0fe00000> 80010044 baa10014 38210040
Adding a printk before that line shows:
status->rate_idx = 255, sband->n_bitrates = 12
status->rate_idx is apparently wrong. Search for rate_idx in ath5k
sources finds an array with the same name, but ignoring it, I see this
in base.c:
rxs.rate_idx = ath5k_hw_to_driver_rix(sc, rs.rs_rate);
ath5k_hw_to_driver_rix() is simple function that takes values from the
rate_idx array, some elements of which are actually initialized with -1
in ath5k_setup_rate_idx().
While rxs.rate_idx has type int, the rate_idx array has type u8.
Perhaps it should be s8, or the value of 255 should be handled specially
if valid indices can exceed 127.
This patch is compile-tested only. I'm leaving it overnight for
testing.
diff --git a/drivers/net/wireless/ath5k/base.h b/drivers/net/wireless/ath5k/base.h
index 06d1054..453eaec 100644
--- a/drivers/net/wireless/ath5k/base.h
+++ b/drivers/net/wireless/ath5k/base.h
@@ -112,7 +112,7 @@ struct ath5k_softc {
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
struct ieee80211_channel channels[ATH_CHAN_MAX];
struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
- u8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
+ s8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
enum nl80211_iftype opmode;
struct ath5k_hw *ah; /* Atheros HW */
--
Regards,
Pavel Roskin
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [ath5k-devel] ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255
2008-10-23 22:12 ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255 Pavel Roskin
@ 2008-10-24 1:33 ` Pavel Roskin
2008-10-24 18:58 ` Bob Copeland
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2008-10-24 1:33 UTC (permalink / raw)
To: ath5k-devel, wireless
> Adding a printk before that line shows:
> status->rate_idx = 255, sband->n_bitrates = 12
...
> While rxs.rate_idx has type int, the rate_idx array has type u8.
> Perhaps it should be s8, or the value of 255 should be handled specially
> if valid indices can exceed 127.
>
> This patch is compile-tested only. I'm leaving it overnight for
> testing.
Oh well, I still get the same badness:
status->rate_idx = -1, sband->n_bitrates = 12
Not much better.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ath5k-devel] ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255
2008-10-24 1:33 ` [ath5k-devel] " Pavel Roskin
@ 2008-10-24 18:58 ` Bob Copeland
2008-10-24 19:01 ` Bob Copeland
0 siblings, 1 reply; 7+ messages in thread
From: Bob Copeland @ 2008-10-24 18:58 UTC (permalink / raw)
To: Pavel Roskin; +Cc: ath5k-devel, wireless
On Thu, Oct 23, 2008 at 9:33 PM, Pavel Roskin <proski@gnu.org> wrote:
> Oh well, I still get the same badness:
> status->rate_idx = -1, sband->n_bitrates = 12
There have been a rash of warnings in this area lately:
http://article.gmane.org/gmane.linux.drivers.ath5k.devel/1311
http://article.gmane.org/gmane.linux.drivers.ath5k.devel/1353 (end)
also possibly related:
http://article.gmane.org/gmane.linux.kernel.wireless.general/22711
I guess like ath9k, rc stuff isn't setup properly, but I wouldn't know.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ath5k-devel] ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255
2008-10-24 18:58 ` Bob Copeland
@ 2008-10-24 19:01 ` Bob Copeland
2008-10-24 21:05 ` Pavel Roskin
0 siblings, 1 reply; 7+ messages in thread
From: Bob Copeland @ 2008-10-24 19:01 UTC (permalink / raw)
To: Pavel Roskin; +Cc: ath5k-devel, wireless
On Fri, Oct 24, 2008 at 2:58 PM, Bob Copeland <me@bobcopeland.com> wrote:
> http://article.gmane.org/gmane.linux.kernel.wireless.general/22711
>
> I guess like ath9k, rc stuff isn't setup properly, but I wouldn't know.
Err, that's tx path not rx, so maybe not.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ath5k-devel] ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255
2008-10-24 19:01 ` Bob Copeland
@ 2008-10-24 21:05 ` Pavel Roskin
2008-10-30 1:22 ` Bob Copeland
0 siblings, 1 reply; 7+ messages in thread
From: Pavel Roskin @ 2008-10-24 21:05 UTC (permalink / raw)
To: Bob Copeland; +Cc: ath5k-devel, wireless
On Fri, 2008-10-24 at 15:01 -0400, Bob Copeland wrote:
> On Fri, Oct 24, 2008 at 2:58 PM, Bob Copeland <me@bobcopeland.com> wrote:
> > http://article.gmane.org/gmane.linux.kernel.wireless.general/22711
> >
> > I guess like ath9k, rc stuff isn't setup properly, but I wouldn't know.
>
> Err, that's tx path not rx, so maybe not.
Correct. But
http://article.gmane.org/gmane.linux.drivers.ath5k.devel/1311 is what
I'm seeing.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ath5k-devel] ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255
2008-10-24 21:05 ` Pavel Roskin
@ 2008-10-30 1:22 ` Bob Copeland
2008-10-30 14:12 ` Bob Copeland
0 siblings, 1 reply; 7+ messages in thread
From: Bob Copeland @ 2008-10-30 1:22 UTC (permalink / raw)
To: Pavel Roskin; +Cc: ath5k-devel, wireless
On Fri, Oct 24, 2008 at 5:05 PM, Pavel Roskin <proski@gnu.org> wrote:
> On Fri, 2008-10-24 at 15:01 -0400, Bob Copeland wrote:
>> On Fri, Oct 24, 2008 at 2:58 PM, Bob Copeland <me@bobcopeland.com> wrote:
>> > http://article.gmane.org/gmane.linux.kernel.wireless.general/22711
>> >
>> > I guess like ath9k, rc stuff isn't setup properly, but I wouldn't know.
>>
>> Err, that's tx path not rx, so maybe not.
>
> Correct. But
> http://article.gmane.org/gmane.linux.drivers.ath5k.devel/1311 is what
> I'm seeing.
So, any hints on how to reproduce this one? Seems lots of people are
hitting it but I haven't seen it yet (though I was working on
2.6.27-rc2 up until yesterday).
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ath5k-devel] ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255
2008-10-30 1:22 ` Bob Copeland
@ 2008-10-30 14:12 ` Bob Copeland
0 siblings, 0 replies; 7+ messages in thread
From: Bob Copeland @ 2008-10-30 14:12 UTC (permalink / raw)
To: Pavel Roskin; +Cc: ath5k-devel, wireless
On Wed, Oct 29, 2008 at 9:22 PM, Bob Copeland <me@bobcopeland.com> wrote:
> So, any hints on how to reproduce this one? Seems lots of people are
> hitting it but I haven't seen it yet (though I was working on
> 2.6.27-rc2 up until yesterday).
Nevermind, leaving it on overnight, I got the warning too. I guess I'll
sprinkle some printks about.
If nothing else, the -1 and u8 stuff is ugly and should probably be fixed,
but it will result in the same warning since rate_idx will be >> n_bitrates.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-10-30 14:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23 22:12 ath5k: badness at net/mac80211/rx.c:2200, status->rate_idx = 255 Pavel Roskin
2008-10-24 1:33 ` [ath5k-devel] " Pavel Roskin
2008-10-24 18:58 ` Bob Copeland
2008-10-24 19:01 ` Bob Copeland
2008-10-24 21:05 ` Pavel Roskin
2008-10-30 1:22 ` Bob Copeland
2008-10-30 14:12 ` Bob Copeland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).