Date: Fri, 6 Oct 2006 19:48:20 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 107372 for review Message-ID: <200610061948.k96JmK6l087380@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107372 Change 107372 by imp@imp_lighthouse on 2006/10/06 19:48:15 Report the rmii config info via a sysctl. Tweak a comment. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/if_ate.c#55 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#55 (text+ko) ==== @@ -29,7 +29,7 @@ * * 1) detach * 2) Free dma setup - * 3) Turn on the clock in pmc and turn on pins? Turn off? + * 3) Turn on the clock in pmc? Turn off? */ #include <sys/cdefs.h> @@ -45,6 +45,7 @@ #include <sys/rman.h> #include <sys/socket.h> #include <sys/sockio.h> +#include <sys/sysctl.h> #include <machine/bus.h> #include <net/ethernet.h> @@ -167,6 +168,8 @@ { struct ate_softc *sc = device_get_softc(dev); struct ifnet *ifp = NULL; + struct sysctl_ctx_list *sctx; + struct sysctl_oid *soid; int err; u_char eaddr[6]; @@ -177,6 +180,13 @@ sc->use_rmii = (RD4(sc, ETH_CFG) & ETH_CFG_RMII) == ETH_CFG_RMII; + + /*Sysctls*/ + sctx = device_get_sysctl_ctx(dev); + soid = device_get_sysctl_tree(dev); + SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "rmii", + CTLFLAG_RD, &sc->use_rmii, 0, "rmii in use"); + /* calling atestop before ifp is set is OK */ atestop(sc); ATE_LOCK_INIT(sc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610061948.k96JmK6l087380>