svn commit: r298594 - head/sys/dev/iwm
Adrian Chadd
adrian at FreeBSD.org
Mon Apr 25 22:00:06 UTC 2016
Author: adrian
Date: Mon Apr 25 22:00:05 2016
New Revision: 298594
URL: https://svnweb.freebsd.org/changeset/base/298594
Log:
[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
Modified:
head/sys/dev/iwm/if_iwm.c
Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c Mon Apr 25 21:14:32 2016 (r298593)
+++ head/sys/dev/iwm/if_iwm.c Mon Apr 25 22:00:05 2016 (r298594)
@@ -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) {
More information about the svn-src-head
mailing list