diff options
author | harti <harti@FreeBSD.org> | 2003-07-29 14:05:45 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-07-29 14:05:45 +0000 |
commit | 8d0166bd1fdfccea6334aff0b40004390f2e5bc8 (patch) | |
tree | 48050a0397a5af2e62f6d8a8bcbc5d3aee20e361 /sys | |
parent | e000fb3d4dc4e88d0003660c20e95e8a20e72b2f (diff) | |
download | FreeBSD-src-8d0166bd1fdfccea6334aff0b40004390f2e5bc8.zip FreeBSD-src-8d0166bd1fdfccea6334aff0b40004390f2e5bc8.tar.gz |
Remove the rather bogus statistics sysctl and merge it into the
internal driver statistics sysctl.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/hatm/if_hatm.c | 21 | ||||
-rw-r--r-- | sys/dev/hatm/if_hatmvar.h | 4 |
2 files changed, 8 insertions, 17 deletions
diff --git a/sys/dev/hatm/if_hatm.c b/sys/dev/hatm/if_hatm.c index e1704e7..9af2b49 100644 --- a/sys/dev/hatm/if_hatm.c +++ b/sys/dev/hatm/if_hatm.c @@ -1245,7 +1245,6 @@ hatm_init(void *p) } enum { - CTL_STATS, CTL_ISTATS, }; @@ -1262,10 +1261,6 @@ hatm_sysctl(SYSCTL_HANDLER_ARGS) switch (arg2) { - case CTL_STATS: - len = sizeof(uint32_t) * 4; - break; - case CTL_ISTATS: len = sizeof(sc->istats); break; @@ -1279,14 +1274,11 @@ hatm_sysctl(SYSCTL_HANDLER_ARGS) switch (arg2) { - case CTL_STATS: - ret[0] = READ4(sc, HE_REGO_MCC); - ret[1] = READ4(sc, HE_REGO_OEC); - ret[2] = READ4(sc, HE_REGO_DCC); - ret[3] = READ4(sc, HE_REGO_CEC); - break; - case CTL_ISTATS: + sc->istats.mcc += READ4(sc, HE_REGO_MCC); + sc->istats.oec += READ4(sc, HE_REGO_OEC); + sc->istats.dcc += READ4(sc, HE_REGO_DCC); + sc->istats.cec += READ4(sc, HE_REGO_CEC); bcopy(&sc->istats, ret, sizeof(sc->istats)); break; } @@ -1778,11 +1770,6 @@ hatm_attach(device_t dev) hatm_sysctl, "LU", "internal statistics") == NULL) goto failed; - if (SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), - OID_AUTO, "stats", CTLFLAG_RD | CTLTYPE_OPAQUE, sc, CTL_STATS, - hatm_sysctl, "LU", "card statistics") == NULL) - goto failed; - #ifdef HATM_DEBUG if (SYSCTL_ADD_PROC(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, "tsr", CTLFLAG_RD | CTLTYPE_OPAQUE, sc, 0, diff --git a/sys/dev/hatm/if_hatmvar.h b/sys/dev/hatm/if_hatmvar.h index 92722d0..3cb9417 100644 --- a/sys/dev/hatm/if_hatmvar.h +++ b/sys/dev/hatm/if_hatmvar.h @@ -58,6 +58,10 @@ struct istats { uint32_t itype_phys; uint32_t itype_err; uint32_t defrag; + uint32_t mcc; + uint32_t oec; + uint32_t dcc; + uint32_t cec; }; /* Card memory layout parameters */ |