summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2016-04-25 22:00:05 +0000
committeradrian <adrian@FreeBSD.org>2016-04-25 22:00:05 +0000
commitcdb6b65cc55fd7d68303ffbc05598a52b0fc6630 (patch)
tree861da480b38bd98ce3429407d47f9a1fe6fd5f66 /sys/dev
parent0431769ee9ec66a615119290fe5841320f96682e (diff)
downloadFreeBSD-src-cdb6b65cc55fd7d68303ffbc05598a52b0fc6630.zip
FreeBSD-src-cdb6b65cc55fd7d68303ffbc05598a52b0fc6630.tar.gz
[iwm] restart the VAP if there's a firmware panic.
Always print out the firmware panic info before restarting; don't put it behind IWM_DEBUG. Submitted by: bapt Differential Revision: https://reviews.freebsd.org/D6081
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/iwm/if_iwm.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index d94657f..7e04d33 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -4344,7 +4344,6 @@ iwm_intr(void *arg)
handled |= (r1 & (IWM_CSR_INT_BIT_ALIVE /*| IWM_CSR_INT_BIT_SCD*/));
if (r1 & IWM_CSR_INT_BIT_SW_ERR) {
-#ifdef IWM_DEBUG
int i;
struct ieee80211com *ic = &sc->sc_ic;
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
@@ -4364,13 +4363,21 @@ iwm_intr(void *arg)
" rx ring: cur=%d\n", sc->rxq.cur);
device_printf(sc->sc_dev,
" 802.11 state %d\n", vap->iv_state);
-#endif
- device_printf(sc->sc_dev, "fatal firmware error\n");
- iwm_stop(sc);
- rv = 1;
- goto out;
+ /* Don't stop the device; just do a VAP restart */
+ IWM_UNLOCK(sc);
+ if (vap == NULL) {
+ printf("%s: null vap\n", __func__);
+ return;
+ }
+
+ device_printf(sc->sc_dev, "%s: controller panicked, iv_state = %d; "
+ "restarting\n", __func__, vap->iv_state);
+
+ /* XXX TODO: turn this into a callout/taskqueue */
+ ieee80211_restart_all(ic);
+ return;
}
if (r1 & IWM_CSR_INT_BIT_HW_ERR) {
OpenPOWER on IntegriCloud