I don't think any normal human being understands the lines
printed by the wpi(4) driver after 'fatal firmware error'.
wpi0: fatal firmware error
firmware error log (count=1):
error type = "UNKNOWN" (0x00000013)
error data = 0x00000070
branch link = 0x000008B600000274
interrupt link = 0x0000032000006AA8
time = 3028342675
driver status:
tx ring 0: qid=0 cur=178 queued=21
tx ring 1: qid=1 cur=0 queued=0
tx ring 2: qid=2 cur=0 queued=0
tx ring 3: qid=3 cur=0 queued=0
tx ring 4: qid=4 cur=21 queued=0
tx ring 5: qid=5 cur=0 queued=0
rx ring: cur=0
802.11 state 4
Anyone seriously looking at this is hacking the driver anyway.
For everyone else it's just dmesg spam.
Let's ifdef this away into WPI_DEBUG like it's done in iwm(4).
ok?
Index: if_wpi.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_wpi.c,v
retrieving revision 1.135
diff -u -p -r1.135 if_wpi.c
--- if_wpi.c 5 Sep 2016 08:18:40 -0000 1.135
+++ if_wpi.c 5 Oct 2016 20:27:12 -0000
@@ -1526,6 +1526,7 @@ wpi_notif_intr(struct wpi_softc *sc)
WPI_WRITE(sc, WPI_FH_RX_WPTR, hw & ~7);
}
+#ifdef WPI_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
@@ -1593,6 +1594,7 @@ wpi_fatal_intr(struct wpi_softc *sc)
printf(" 802.11 state %d\n", sc->sc_ic.ic_state);
#undef N
}
+#endif
int
wpi_intr(void *arg)
@@ -1622,7 +1624,9 @@ wpi_intr(void *arg)
if (r1 & (WPI_INT_SW_ERR | WPI_INT_HW_ERR)) {
printf("%s: fatal firmware error\n", sc->sc_dev.dv_xname);
/* Dump firmware error log and stop. */
+#ifdef WPI_DEBUG
wpi_fatal_intr(sc);
+#endif
wpi_stop(ifp, 1);
task_add(systq, &sc->init_task);
return 1;