svn commit: r225958 - user/adrian/if_ath_tx/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Tue Oct 4 04:00:30 UTC 2011


Author: adrian
Date: Tue Oct  4 04:00:29 2011
New Revision: 225958
URL: http://svn.freebsd.org/changeset/base/225958

Log:
  Add a debugging twiddle - something to force a bstuck condition.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c	Tue Oct  4 00:32:10 2011	(r225957)
+++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_sysctl.c	Tue Oct  4 04:00:29 2011	(r225958)
@@ -449,6 +449,24 @@ ath_sysctl_setcca(SYSCTL_HANDLER_ARGS)
 }
 #endif /* IEEE80211_SUPPORT_TDMA */
 
+static int
+ath_sysctl_forcebstuck(SYSCTL_HANDLER_ARGS)
+{
+	struct ath_softc *sc = arg1;
+	int val = 0;
+	int error;
+
+	error = sysctl_handle_int(oidp, &val, 0, req);
+	if (error || !req->newptr)
+		return error;
+	if (val == 0)
+		return 0;
+
+	taskqueue_enqueue_fast(sc->sc_tq, &sc->sc_bstucktask);
+	val = 0;
+	return 0;
+}
+
 void
 ath_sysctlattach(struct ath_softc *sc)
 {
@@ -532,6 +550,10 @@ ath_sysctlattach(struct ath_softc *sc)
 		"txagg", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
 		ath_sysctl_txagg, "I", "");
 
+	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+		"forcebstuck", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
+		ath_sysctl_forcebstuck, "I", "");
+
 	if (ath_hal_hasintmit(ah)) {
 		SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
 			"intmit", CTLTYPE_INT | CTLFLAG_RW, sc, 0,


More information about the svn-src-user mailing list