Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/altera/atse/if_atse.c
Show All 12 Lines | |||||
/* MAC statistics. */ | /* MAC statistics. */ | ||||
for (i = 0; i < nitems(atse_mac_stats_regs); i++) { | for (i = 0; i < nitems(atse_mac_stats_regs); i++) { | ||||
if (atse_mac_stats_regs[i].name == NULL || | if (atse_mac_stats_regs[i].name == NULL || | ||||
atse_mac_stats_regs[i].descr == NULL) { | atse_mac_stats_regs[i].descr == NULL) { | ||||
continue; | continue; | ||||
} | } | ||||
SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, | SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, | ||||
atse_mac_stats_regs[i].name, CTLTYPE_UINT|CTLFLAG_RD, | atse_mac_stats_regs[i].name, | ||||
CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, | |||||
sc, i, sysctl_atse_mac_stats_proc, "IU", | sc, i, sysctl_atse_mac_stats_proc, "IU", | ||||
atse_mac_stats_regs[i].descr); | atse_mac_stats_regs[i].descr); | ||||
} | } | ||||
/* rx_err[]. */ | /* rx_err[]. */ | ||||
for (i = 0; i < ATSE_RX_ERR_MAX; i++) { | for (i = 0; i < ATSE_RX_ERR_MAX; i++) { | ||||
if (atse_rx_err_stats_regs[i].name == NULL || | if (atse_rx_err_stats_regs[i].name == NULL || | ||||
atse_rx_err_stats_regs[i].descr == NULL) { | atse_rx_err_stats_regs[i].descr == NULL) { | ||||
continue; | continue; | ||||
} | } | ||||
SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, | SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, | ||||
atse_rx_err_stats_regs[i].name, CTLTYPE_UINT|CTLFLAG_RD, | atse_rx_err_stats_regs[i].name, | ||||
CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, | |||||
sc, i, sysctl_atse_rx_err_stats_proc, "IU", | sc, i, sysctl_atse_rx_err_stats_proc, "IU", | ||||
atse_rx_err_stats_regs[i].descr); | atse_rx_err_stats_regs[i].descr); | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* Generic device handling routines. | * Generic device handling routines. | ||||
*/ | */ | ||||
Show All 12 Lines |