From: Bruno Randolf <br1@einfach.org>
To: Bob Copeland <me@bobcopeland.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
ath5k-devel@lists.ath5k.org, jirislaby@gmail.com,
mickflemm@gmail.com, lrodriguez@atheros.com
Subject: Re: [PATCH 2/2] ath5k: disable tasklets during reset
Date: Wed, 14 Jul 2010 10:35:57 +0900 [thread overview]
Message-ID: <201007141035.57252.br1@einfach.org> (raw)
In-Reply-To: <1279035161-10802-2-git-send-email-me@bobcopeland.com>
On Wed July 14 2010 00:32:41 Bob Copeland wrote:
> Based on a patch from Bruno Randolf, attempting useful
> work while we are resetting the chip just leads to interface
> lockups and bad descriptor data, and possibly DMAing to
> freed buffers. Let's suspend all tasklets while
> reprogramming the registers in the card to avoid such
> problems.
>
> In the future we can convert the tasklets to threaded
> interrupt handlers to simplify things.
>
> Signed-off-by: Bob Copeland <me@bobcopeland.com>
> ---
> drivers/net/wireless/ath/ath5k/base.c | 20 ++++++++++++++------
> 1 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/base.c
> b/drivers/net/wireless/ath/ath5k/base.c index b290cc6..b0e1ca9 100644
> --- a/drivers/net/wireless/ath/ath5k/base.c
> +++ b/drivers/net/wireless/ath/ath5k/base.c
> @@ -2639,6 +2639,15 @@ ath5k_stop_locked(struct ath5k_softc *sc)
> return 0;
> }
>
> +static void stop_tasklets(struct ath5k_softc *sc)
> +{
> + tasklet_kill(&sc->rxtq);
> + tasklet_kill(&sc->txtq);
> + tasklet_kill(&sc->calib);
> + tasklet_kill(&sc->beacontq);
> + tasklet_kill(&sc->ani_tasklet);
> +}
> +
> /*
> * Stop the device, grabbing the top-level lock to protect
> * against concurrent entry through ath5k_init (which can happen
> @@ -2683,11 +2692,7 @@ ath5k_stop_hw(struct ath5k_softc *sc)
> mmiowb();
> mutex_unlock(&sc->lock);
>
> - tasklet_kill(&sc->rxtq);
> - tasklet_kill(&sc->txtq);
> - tasklet_kill(&sc->calib);
> - tasklet_kill(&sc->beacontq);
> - tasklet_kill(&sc->ani_tasklet);
> + stop_tasklets(sc);
>
> ath5k_rfkill_hw_stop(sc->ah);
>
> @@ -2937,8 +2942,11 @@ ath5k_reset(struct ath5k_softc *sc, struct
> ieee80211_channel *chan)
>
> ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");
>
> + ath5k_hw_set_imr(ah, 0);
> + synchronize_irq(sc->pdev->irq);
> + stop_tasklets(sc);
> +
> if (chan) {
> - ath5k_hw_set_imr(ah, 0);
> ath5k_txq_cleanup(sc);
> ath5k_rx_stop(sc);
please get this into 2.6.36...
Acked-by: Bruno Randolf <br1@einfach.org>
next prev parent reply other threads:[~2010-07-14 1:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 15:32 [PATCH 1/2] ath5k: move reset to mac80211 workqueue Bob Copeland
2010-07-13 15:32 ` [PATCH 2/2] ath5k: disable tasklets during reset Bob Copeland
2010-07-14 1:35 ` Bruno Randolf [this message]
2010-07-13 17:39 ` [PATCH 1/2] ath5k: move reset to mac80211 workqueue Luis R. Rodriguez
2010-07-14 1:35 ` Bruno Randolf
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=201007141035.57252.br1@einfach.org \
--to=br1@einfach.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=jirislaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
--cc=me@bobcopeland.com \
--cc=mickflemm@gmail.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).