From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Date: Fri, 5 Jul 2013 10:47:36 +0300 Subject: [ath9k-devel] [PATCH v2 1/3] ath10k: implement device recovery In-Reply-To: <1372148011-28234-2-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Tue, 25 Jun 2013 10:13:29 +0200") References: <1372148011-28234-1-git-send-email-michal.kazior@tieto.com> <1372148011-28234-2-git-send-email-michal.kazior@tieto.com> Message-ID: <87bo6hh2hz.fsf@kamboji.qca.qualcomm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Michal Kazior 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 [...] > --- a/drivers/net/wireless/ath/ath10k/core.h > +++ b/drivers/net/wireless/ath/ath10k/core.h > @@ -250,6 +250,20 @@ struct ath10k_debug { > enum ath10k_state { > ATH10K_STATE_OFF = 0, > ATH10K_STATE_ON, > + > + /* When doing firmware recovery the device is first powered down. > + * mac80211 is supposed to call in to start() hook later on. It is > + * however possible that driver unloading and firmware crash overlap. > + * mac80211 can wait on conf_mutex in stop() while the device is > + * stopped in ath10k_core_restart() work holding conf_mutex. */ > + ATH10K_STATE_RESTARTING_OFF, > + ATH10K_STATE_RESTARTING_ON, I feel that RESTARTING_OFF and RESTARTING_ON are a bit confusing names, especially when we have OFF and ON states. Wouldn't RESTARTING and RESTARTED be simpler? -- Kalle Valo