svn commit: r297531 - head/sys/dev/iwn
Adrian Chadd
adrian at FreeBSD.org
Sun Apr 3 23:40:00 UTC 2016
Author: adrian
Date: Sun Apr 3 23:39:58 2016
New Revision: 297531
URL: https://svnweb.freebsd.org/changeset/base/297531
Log:
[iwn] Don't try to seamlessly recover from a firmware panic; just restart
the interface.
I know this may be unpopular, but iwn is not yet completely ready for
a transparent firmware restart. I have this thing panic my laptop
reliably because 11n state isn't kept in sync and the TX completion
path ends up trying to free a null node reference.
Modified:
head/sys/dev/iwn/if_iwn.c
Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c Sun Apr 3 23:03:54 2016 (r297530)
+++ head/sys/dev/iwn/if_iwn.c Sun Apr 3 23:39:58 2016 (r297531)
@@ -8701,7 +8701,9 @@ iwn_panicked(void *arg0, int pending)
struct iwn_softc *sc = arg0;
struct ieee80211com *ic = &sc->sc_ic;
struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
+#if 0
int error;
+#endif
if (vap == NULL) {
printf("%s: null vap\n", __func__);
@@ -8709,8 +8711,18 @@ iwn_panicked(void *arg0, int pending)
}
device_printf(sc->sc_dev, "%s: controller panicked, iv_state = %d; "
- "resetting...\n", __func__, vap->iv_state);
+ "restarting\n", __func__, vap->iv_state);
+ /*
+ * This is not enough work. We need to also reinitialise
+ * the correct transmit state for aggregation enabled queues,
+ * which has a very specific requirement of
+ * ring index = 802.11 seqno % 256. If we don't do this (which
+ * we definitely don't!) then the firmware will just panic again.
+ */
+#if 1
+ ieee80211_restart_all(ic);
+#else
IWN_LOCK(sc);
iwn_stop_locked(sc);
@@ -8727,6 +8739,7 @@ iwn_panicked(void *arg0, int pending)
}
IWN_UNLOCK(sc);
+#endif
}
static void
More information about the svn-src-all
mailing list