linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: <linux-wireless@vger.kernel.org>, <linville@tuxdriver.com>,
	<rodrigue@qca.qualcomm.com>, <rmanohar@qca.qualcomm.com>
Subject: Re: [PATCH v7 2/4] ath9k: always call ath_reset from workqueue context
Date: Tue, 30 Aug 2011 10:56:01 +0530	[thread overview]
Message-ID: <20110830052559.GB31187@vasanth-laptop> (raw)
In-Reply-To: <1314643245-59142-2-git-send-email-nbd@openwrt.org>

On Mon, Aug 29, 2011 at 08:40:43PM +0200, Felix Fietkau wrote:
> This makes it much easier to add further rework to avoid race conditions
> between reset and other work items.
> Move other functions to make ath_reset static.

Can you please explain where you'll run into race during
ath_reset()?. It's always called with pcu_lock held.

> @@ -386,9 +386,7 @@ void ath_beacon_tasklet(unsigned long data)
>  			ath_dbg(common, ATH_DBG_BSTUCK,
>  				"beacon is officially stuck\n");
>  			sc->sc_flags |= SC_OP_TSF_RESET;
> -			spin_lock(&sc->sc_pcu_lock);
> -			ath_reset(sc, true);
> -			spin_unlock(&sc->sc_pcu_lock);
> +			ieee80211_queue_work(sc->hw, &sc->hw_reset_work);

We'll expect a reset happening as soon possible here. Handling this
in a work item may not be appropriate.

>  void ath9k_tasklet(unsigned long data)
>  {
> @@ -675,9 +607,7 @@ void ath9k_tasklet(unsigned long data)
>  
>  	if ((status & ATH9K_INT_FATAL) ||
>  	    (status & ATH9K_INT_BB_WATCHDOG)) {
> -		spin_lock(&sc->sc_pcu_lock);
> -		ath_reset(sc, true);
> -		spin_unlock(&sc->sc_pcu_lock);
> +		ieee80211_queue_work(sc->hw, &sc->hw_reset_work);

Above comment applies here as well.

Vasanth

  parent reply	other threads:[~2011-08-30  5:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 18:40 [PATCH v7 1/4] ath9k: eliminate common->{rx,tx}_chainmask Felix Fietkau
2011-08-29 18:40 ` [PATCH v7 2/4] ath9k: always call ath_reset from workqueue context Felix Fietkau
2011-08-29 18:40   ` [PATCH v7 3/4] ath9k: merge reset related functions Felix Fietkau
2011-08-29 18:40     ` [PATCH v7 4/4] ath9k: implement .get_antenna and .set_antenna Felix Fietkau
2011-08-30  7:21     ` [PATCH v7 3/4] ath9k: merge reset related functions Rajkumar Manoharan
2011-08-30  5:26   ` Vasanthakumar Thiagarajan [this message]
2011-08-30  5:40     ` [PATCH v7 2/4] ath9k: always call ath_reset from workqueue context Felix Fietkau
2011-08-30  5:57   ` Mohammed Shafi
2011-08-30  6:09     ` Felix Fietkau
2011-08-30  6:20       ` Mohammed Shafi
2011-08-30  6:44         ` Felix Fietkau
2011-08-30  6:51           ` Mohammed Shafi
2011-08-30  6:26   ` Rajkumar Manoharan
2011-08-30  6:42     ` Felix Fietkau

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=20110830052559.GB31187@vasanth-laptop \
    --to=vthiagar@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=nbd@openwrt.org \
    --cc=rmanohar@qca.qualcomm.com \
    --cc=rodrigue@qca.qualcomm.com \
    /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;
as well as URLs for NNTP newsgroup(s).