From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Subject: Re: mac80211 suspend corner case (was: Asus eeepc 1008HA suspend issue and mac80211 suspend corner) case
Date: Wed, 23 Dec 2009 08:28:13 -0800 [thread overview]
Message-ID: <20091223162813.GB2609@tux> (raw)
In-Reply-To: <1261570081.25008.1.camel@johannes.local>
On Wed, Dec 23, 2009 at 04:08:01AM -0800, Johannes Berg wrote:
> On Tue, 2009-12-22 at 14:30 -0500, Luis R. Rodriguez wrote:
>
> > Johannes, any preferences how to handle this? The patch below avoids
> > the Interrupt being turned off but its not enough given that we still
> > could be associated according to userspace. If the hardware is
> > unresponsive maybe it is best to just let the IRQ go disabled, not
> > sure, but its likely not what happens in all cases.
> >
> > Trimming out the irrelevant parts below.
>
> > http://bombadil.infradead.org/~mcgrof/logs/2.6.31-with-2.6.32-wireless
> > /irq-disabled.txt
> > >
> > > This can be fixed by something like the following:
> > >
> > > diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> > > index e6c08da..63d42fa 100644
> > > --- a/net/mac80211/util.c
> > > +++ b/net/mac80211/util.c
> > > @@ -1031,7 +1031,14 @@ int ieee80211_reconfig(struct ieee80211_local
> > *local)
> > >
> > > /* restart hardware */
> > > if (local->open_count) {
> > > + /*
> > > + * Upon resume hardware can sometimes be goofy due to
> > > + * various platform issues, so restarting the device may
> > > + * at times not work immediately. Propagate the error.
> > > + */
> > > res = drv_start(local);
> > > + if (res)
> > > + return res;
> > >
> > > ieee80211_led_radio(local, true);
> > > }
> > >
> > > But this isn't enough. And since we cannot exactly talk to hardware
> > > we can't try to send a deassoc as harware would be unresponsive. I
> > > also don't see us handling such cases before either on cfg80211 or
> > > mac80211, so curious what we should do.
>
> Well it seems to me that if the driver determines that the hardware is
> unreachable or not responding, it would unregister it from mac80211,
> which would clean up all user-visible state, obviously.
The drivers would not know this until it fails on the first call
from mac80211 which would be start().
> The patch above seems ok to me, but basically papers over the problem.
> If the start there fails, the driver will have to unregister the hw
> since any subsequent start will fail as well.
How about just having mac80211 do that for drivers where the start()
fails and we are resuming? I can give that a shot.
> The way I see it, it's like a USB unplug while suspended/hibernated ...
> the driver notices that and remo
I see, in this case though I'd prefer if mac80211 could do more of
the work instead of requiring each driver to treat start() failures
by unregistering themselves, specially since we don't inform drivers
they are coming back from resume on start().
Luis
next prev parent reply other threads:[~2009-12-23 16:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 2:23 Asus eeepc 1008HA suspend issue and mac80211 suspend corner case Luis R. Rodriguez
2009-12-22 4:39 ` Sujith
2009-12-22 15:50 ` Luis R. Rodriguez
2009-12-22 16:20 ` Luis R. Rodriguez
2009-12-22 16:55 ` Luis R. Rodriguez
2009-12-22 17:59 ` Luis R. Rodriguez
2009-12-23 1:16 ` Luis R. Rodriguez
2009-12-23 2:52 ` Sujith
2009-12-23 2:54 ` Luis R. Rodriguez
2009-12-23 4:06 ` Sujith
2009-12-23 4:00 ` Luis R. Rodriguez
2009-12-23 4:54 ` Sujith
2009-12-23 18:33 ` Luis R. Rodriguez
2009-12-23 19:07 ` Luis R. Rodriguez
2009-12-23 2:29 ` Sujith
2009-12-23 2:40 ` Luis R. Rodriguez
2009-12-23 3:47 ` Sujith
2009-12-23 16:25 ` Luis R. Rodriguez
2009-12-23 2:19 ` Sujith
2009-12-23 2:39 ` Luis R. Rodriguez
2009-12-22 19:12 ` lspci CorrErr- UnsuppReq- changes (was: Asus eeepc 1008HA suspend issue and mac80211 suspend corner) case Luis R. Rodriguez
2009-12-22 19:30 ` mac80211 suspend corner case " Luis R. Rodriguez
2009-12-23 12:08 ` Johannes Berg
2009-12-23 16:28 ` Luis R. Rodriguez [this message]
2009-12-23 16:47 ` Johannes Berg
2009-12-23 19:08 ` Luis R. Rodriguez
2009-12-23 19:11 ` Johannes Berg
2009-12-23 19:19 ` Luis R. Rodriguez
2009-12-24 12:43 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091223162813.GB2609@tux \
--to=lrodriguez@atheros.com \
--cc=Luis.Rodriguez@Atheros.com \
--cc=alan-jenkins@tuffmail.co.uk \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox