public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	stable@kernel.org
Subject: Re: [PATCH v2 1/5] mac80211: fix race with suspend and dynamic_ps_disable_work
Date: Tue, 05 Jan 2010 10:14:43 +0100	[thread overview]
Message-ID: <1262682883.20098.4.camel@johannes.local> (raw)
In-Reply-To: <1261686369-12362-1-git-send-email-lrodriguez@atheros.com>

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

On Thu, 2009-12-24 at 15:26 -0500, Luis R. Rodriguez wrote:
> When mac80211 suspends it calls a driver's suspend callback
> as a last step and after that the driver assumes no calls will
> be made to it until we resume and its start callback is kicked.
> If such calls are made, however, suspend can end up throwing
> hardware in an unexpected state and making the device unusable
> upon resume.
> 
> Fix this by preventing mac80211 to schedule dynamic_ps_disable_work
> by checking for when mac80211 starts to suspend and starts
> quiescing. Frames should be allowed to go through though as
> that is part of the quiescing steps and we do not flush the
> mac80211 workqueue since it was already done towards the
> beginning of suspend cycle.
> 
> The other mac80211 issue will be hanled in the next patch.
> 
> For further details see refer to the thread:
> 
> http://marc.info/?t=126144866100001&r=1&w=2
> 
> Cc: stable@kernel.org
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Looks fine to me.

Acked-by: Johannes Berg <johannes@sipsolutions.net>

> ---
>  net/mac80211/tx.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index ac48c86..42bfd97 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1418,6 +1418,10 @@ static bool need_dynamic_ps(struct
> ieee80211_local *local)
>  	if (!local->ps_sdata)
>  		return false;
>  
> +	/* No point if we're going to suspend */
> +	if (local->quiescing)
> +		return false;
> +
>  	return true;
>  }
>  


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      reply	other threads:[~2010-01-05  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-24 20:26 [PATCH v2 1/5] mac80211: fix race with suspend and dynamic_ps_disable_work Luis R. Rodriguez
2010-01-05  9:14 ` Johannes Berg [this message]

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=1262682883.20098.4.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.com \
    --cc=stable@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