All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 1/3] ath10k: implement device recovery
Date: Fri, 14 Jun 2013 15:32:05 +0300	[thread overview]
Message-ID: <877ghwna9m.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1371042604-1822-2-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Wed, 12 Jun 2013 15:10:02 +0200")

Michal Kazior <michal.kazior@tieto.com> writes:

> Restart the hardware if FW crashes.
>
> If FW crashes during recovery we leave the
> hardware in a "wedged" state to avoid recursive
> recoveries.
>
> When in "wedged" state userspace may bring
> interfaces down (to issue stop()) and then bring
> one interface (to issue start()) to reload
> hardware manually.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

[...]

> --- a/drivers/net/wireless/ath/ath10k/core.h
> +++ b/drivers/net/wireless/ath/ath10k/core.h
> @@ -250,6 +250,7 @@ struct ath10k_debug {
>  enum ath10k_state {
>  	ATH10K_STATE_OFF = 0,
>  	ATH10K_STATE_RESTARTING,
> +	ATH10K_STATE_WEDGED,
>  	ATH10K_STATE_ON
>  };

It would be good to add small comment describing the new state, it might
not be obvious from the name.

[...]

> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -1806,6 +1806,7 @@ static void ath10k_stop(struct ieee80211_hw *hw)
>  	mutex_unlock(&ar->conf_mutex);
>  
>  	cancel_work_sync(&ar->offchan_tx_work);
> +	cancel_work_sync(&ar->restart_work);

The logic for this struct work is a bit scattered. It's initialised in
core.c, stopped in mac.c and pushed to queue from pci.c. To keep things
simple it would be best if we can have all that code in core.c. Here's
one idea:

 * rename current function to ath10k_core_restart_work()

 * create ath10k_core_restart() which just queues the work struct.

 * call cancel_work_sync() from a suitable function in core, do we have
   such a function?



-- 
Kalle Valo

  reply	other threads:[~2013-06-14 12:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 13:10 [ath9k-devel] [PATCH 0/3] ath10k: hardware recovery Michal Kazior
2013-06-12 13:10 ` [ath9k-devel] [PATCH 1/3] ath10k: implement device recovery Michal Kazior
2013-06-14 12:32   ` Kalle Valo [this message]
2013-06-12 13:10 ` [ath9k-devel] [PATCH 2/3] ath10k: implement fw crash simulation command Michal Kazior
2013-06-12 13:10 ` [ath9k-devel] [PATCH 3/3] ath10k: create debugfs interface to trigger fw crash Michal Kazior
2013-06-14 12:34   ` Kalle Valo
2013-06-14 12:48     ` Michal Kazior
2013-06-14 12:51       ` Kalle Valo

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=877ghwna9m.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath9k-devel@lists.ath9k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.