Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/rt/if_rt.c
Show All 12 Lines | |||||
#endif | #endif | ||||
#if defined(IF_RT_PHY_SUPPORT) || defined(RT_MDIO) | #if defined(IF_RT_PHY_SUPPORT) || defined(RT_MDIO) | ||||
static int rt_miibus_readreg(device_t, int, int); | static int rt_miibus_readreg(device_t, int, int); | ||||
static int rt_miibus_writereg(device_t, int, int, int); | static int rt_miibus_writereg(device_t, int, int, int); | ||||
#endif | #endif | ||||
static int rt_ifmedia_upd(struct ifnet *); | static int rt_ifmedia_upd(struct ifnet *); | ||||
static void rt_ifmedia_sts(struct ifnet *, struct ifmediareq *); | static void rt_ifmedia_sts(struct ifnet *, struct ifmediareq *); | ||||
static SYSCTL_NODE(_hw, OID_AUTO, rt, CTLFLAG_RD, 0, "RT driver parameters"); | static SYSCTL_NODE(_hw, OID_AUTO, rt, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, | ||||
"RT driver parameters"); | |||||
#ifdef IF_RT_DEBUG | #ifdef IF_RT_DEBUG | ||||
static int rt_debug = 0; | static int rt_debug = 0; | ||||
SYSCTL_INT(_hw_rt, OID_AUTO, debug, CTLFLAG_RWTUN, &rt_debug, 0, | SYSCTL_INT(_hw_rt, OID_AUTO, debug, CTLFLAG_RWTUN, &rt_debug, 0, | ||||
"RT debug level"); | "RT debug level"); | ||||
#endif | #endif | ||||
static int | static int | ||||
rt_probe(device_t dev) | rt_probe(device_t dev) | ||||
Show All 24 Lines | |||||
struct sysctl_oid *tree; | struct sysctl_oid *tree; | ||||
struct sysctl_oid *stats; | struct sysctl_oid *stats; | ||||
ctx = device_get_sysctl_ctx(sc->dev); | ctx = device_get_sysctl_ctx(sc->dev); | ||||
tree = device_get_sysctl_tree(sc->dev); | tree = device_get_sysctl_tree(sc->dev); | ||||
/* statistic counters */ | /* statistic counters */ | ||||
stats = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | stats = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"stats", CTLFLAG_RD, 0, "statistic"); | "stats", CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "statistic"); | ||||
SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, | SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, | ||||
"interrupts", CTLFLAG_RD, &sc->interrupts, | "interrupts", CTLFLAG_RD, &sc->interrupts, | ||||
"all interrupts"); | "all interrupts"); | ||||
SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, | SYSCTL_ADD_ULONG(ctx, SYSCTL_CHILDREN(stats), OID_AUTO, | ||||
"tx_coherent_interrupts", CTLFLAG_RD, &sc->tx_coherent_interrupts, | "tx_coherent_interrupts", CTLFLAG_RD, &sc->tx_coherent_interrupts, | ||||
"Tx coherent interrupts"); | "Tx coherent interrupts"); | ||||
Show All 12 Lines |