summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-11-16 19:57:16 +0000
committeradrian <adrian@FreeBSD.org>2012-11-16 19:57:16 +0000
commit7a03853cc3f1201e5311a14eebb88a8a3ee424af (patch)
treeff732e1228b34aae0090501d9aa9a72dc22ada7a /sys/dev/ath/if_ath.c
parentf8cb5a00567136d367fb32a28b8dd13a10d6c8c8 (diff)
downloadFreeBSD-src-7a03853cc3f1201e5311a14eebb88a8a3ee424af.zip
FreeBSD-src-7a03853cc3f1201e5311a14eebb88a8a3ee424af.tar.gz
ALQ logging enhancements:
* upon setup, tell the alq code what the chip information is. * add TX/RX path logging for legacy chips. * populate the tx/rx descriptor length fields with a best-estimate. It's overly big (96 bytes when AH_SUPPORT_AR5416 is enabled) but it'll do for now. Whilst I'm here, add CURVNET_RESTORE() here during probe/attach as a partial solution to fixing crashes during attach when the attach fails. There are other attach failures that I have to deal with; those'll come later.
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r--sys/dev/ath/if_ath.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 4ef23a2..2d74e3e 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -296,6 +296,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
if (ifp == NULL) {
device_printf(sc->sc_dev, "can not if_alloc()\n");
error = ENOSPC;
+ CURVNET_RESTORE();
goto bad;
}
ic = ifp->if_l2com;
@@ -890,6 +891,11 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
*/
#ifdef ATH_DEBUG_ALQ
if_ath_alq_init(&sc->sc_alq, device_get_nameunit(sc->sc_dev));
+ if_ath_alq_setcfg(&sc->sc_alq,
+ sc->sc_ah->ah_macVersion,
+ sc->sc_ah->ah_macRev,
+ sc->sc_ah->ah_phyRev,
+ sc->sc_ah->ah_magic);
#endif
/*
@@ -3768,6 +3774,14 @@ ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq, int dosched)
ath_printtxbuf(sc, bf, txq->axq_qnum, 0,
status == HAL_OK);
#endif
+#ifdef ATH_DEBUG_ALQ
+ if (if_ath_alq_checkdebug(&sc->sc_alq,
+ ATH_ALQ_EDMA_TXSTATUS)) {
+ if_ath_alq_post(&sc->sc_alq, ATH_ALQ_EDMA_TXSTATUS,
+ sc->sc_tx_statuslen,
+ (char *) ds);
+ }
+#endif
if (status == HAL_EINPROGRESS) {
ATH_KTR(sc, ATH_KTR_TXCOMP, 3,
OpenPOWER on IntegriCloud