Disable the detailed fatal firmware error log in iwn(4) by default.
Index: if_iwn.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.172
diff -u -p -r1.172 if_iwn.c
--- if_iwn.c 5 Sep 2016 08:18:18 -0000 1.172
+++ if_iwn.c 6 Oct 2016 10:42:41 -0000
@@ -2595,6 +2595,7 @@ iwn_wakeup_intr(struct iwn_softc *sc)
}
}
+#ifdef IWN_DEBUG
/*
* Dump the error log of the firmware when a firmware panic occurs. Although
* we can't debug the firmware because it is neither open source nor free, it
@@ -2606,9 +2607,6 @@ iwn_fatal_intr(struct iwn_softc *sc)
struct iwn_fw_dump dump;
int i;
- /* Force a complete recalibration on next init. */
- sc->sc_flags &= ~IWN_FLAG_CALIB_DONE;
-
/* Check that the error log address is valid. */
if (sc->errptr < IWN_FW_DATA_BASE ||
sc->errptr + sizeof (dump) >
@@ -2657,6 +2655,7 @@ iwn_fatal_intr(struct iwn_softc *sc)
printf(" rx ring: cur=%d\n", sc->rxq.cur);
printf(" 802.11 state %d\n", sc->sc_ic.ic_state);
}
+#endif
int
iwn_intr(void *arg)
@@ -2711,8 +2710,14 @@ iwn_intr(void *arg)
}
if (r1 & (IWN_INT_SW_ERR | IWN_INT_HW_ERR)) {
printf("%s: fatal firmware error\n", sc->sc_dev.dv_xname);
+
+ /* Force a complete recalibration on next init. */
+ sc->sc_flags &= ~IWN_FLAG_CALIB_DONE;
+
/* Dump firmware error log and stop. */
+#ifdef IWN_DEBUG
iwn_fatal_intr(sc);
+#endif
iwn_stop(ifp, 1);
task_add(systq, &sc->init_task);
return 1;