lkml.org 
[lkml]   [2009]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Bug #13337] [post 2.6.29 regression] hang during suspend of b44/b43 modules
Date
Johannes Berg <johannes@sipsolutions.net> writes:

> On Sat, 2009-07-11 at 19:20 +0200, Jan Scholz wrote:
>> Johannes Berg <johannes@sipsolutions.net> writes:
>>
>> > On Sat, 2009-07-11 at 16:07 +0200, Jan Scholz wrote:
>> >
>> >> > Jan, can you run with console_suspend=0 (or whatever it is now, Rafael
>> >> > will correct me if I'm wrong) that should work on your platform, and put
>> >> > a bunch of printk calls into __ieee80211_suspend in net/mac80211/pm.c to
>> >> > see where in there it's hanging?
>> >>
>> >> Did that, seems like it hangs in
>> >> drv_remove_interface(local, &conf);
>> >
>> > Ok, thanks! I was going to suggest doing the same in
>> > b43_op_remove_interface in drivers/net/wireless/b43/main.c, but I think
>> > the problem is just that we have an ordering problem and call drv_stop
>> > before drv_remove_interface. I'll try to come up with a fix soon --
>> > might not be able to today though, in the meantime I guess you can just
>> > move the drv_stop call to the end of the function and tell me if that
>> > works -- that would be racy but should be ok most of the time.
>>
>> I moved drv_stop to the end of the function (see patch below) and now
>> suspend works fine.
>
> Thanks, that's what I suspected -- I'll take a closer look into what is
> required to make it race-free against RX.
>

Hi,

The bug is still present in v2.6.31-rc4, it's still fixed by the patch
(see below) suggested as a test by Johannes.

Regards,
Jan

>> diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
>> index 7a549f9..0ac15fb 100644
>> --- a/net/mac80211/pm.c
>> +++ b/net/mac80211/pm.c
>> @@ -58,12 +58,6 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
>> /* flush again, in case driver queued work */
>> flush_workqueue(local->hw.workqueue);
>>
>> - /* stop hardware - this must stop RX */
>> - if (local->open_count) {
>> - ieee80211_led_radio(local, false);
>> - drv_stop(local);
>> - }
>> -
>> /* remove STAs */
>> spin_lock_irqsave(&local->sta_lock, flags);
>> list_for_each_entry(sta, &local->sta_list, list) {
>> @@ -111,6 +105,12 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
>> drv_remove_interface(local, &conf);
>> }
>>
>> + /* stop hardware - this must stop RX */
>> + if (local->open_count) {
>> + ieee80211_led_radio(local, false);
>> + drv_stop(local);
>> + }
>> +
>> local->suspended = true;
>> local->quiescing = false;
>>

--
Jan Scholz ____ ____ __ ___
( ___)(_ _) /__\ / __)
Frankfurt Institute for Advanced Studies )__) _)(_ /(__)\ \__ \
(__) (____)(__)(__)(___/
Goethe Universitaet Frankfurt
Ruth-Moufang-Str. 1 Tel. 069-798-47534
60438 Frankfurt am Main


\
 
 \ /
  Last update: 2009-07-28 16:43    [W:0.054 / U:42.848 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site