summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2007-03-13 00:41:55 +0000
committerScott Long <scottl@FreeBSD.org>2007-03-13 00:41:55 +0000
commit06e83c7e86824a2bf64e797dca3cf56e60ac3e85 (patch)
treeca2df635ea31c5407ed5ae038b04c8b8dddc7268 /sys
parentfffe34c5a87739301012995db7a33dd7ad167a5d (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/bge/if_bge.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index eea0c97035618..696e39ae896e0 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -4179,7 +4179,7 @@ bge_link_upd(struct bge_softc *sc)
}
#define BGE_SYSCTL_STAT(sc, ctx, desc, parent, node, oid) \
- SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, oid, CTLTYPE_QUAD|CTLFLAG_RD, \
+ SYSCTL_ADD_PROC(ctx, parent, OID_AUTO, oid, CTLTYPE_UINT|CTLFLAG_RD, \
sc, offsetof(struct bge_stats, node), bge_sysctl_stats, "IU", \
desc)
@@ -4220,10 +4220,10 @@ bge_add_sysctls(struct bge_softc *sc)
children, nicDmaWriteHighPriQueueFull, "DmaWriteHighPriQueueFull");
BGE_SYSCTL_STAT(sc, ctx, "NIC No More RX Buffer Descriptors",
children, nicNoMoreRxBDs, "NoMoreRxBDs");
- BGE_SYSCTL_STAT(sc, ctx, "Interface Discarded Frames",
- children, ifInDiscards, "Discards");
- BGE_SYSCTL_STAT(sc, ctx, "Interface Errors",
- children, ifInErrors, "Errors");
+ BGE_SYSCTL_STAT(sc, ctx, "Discarded Input Frames",
+ children, ifInDiscards, "InputDiscards");
+ BGE_SYSCTL_STAT(sc, ctx, "Input Errors",
+ children, ifInErrors, "InputErrors");
BGE_SYSCTL_STAT(sc, ctx, "NIC Recv Threshold Hit",
children, nicRecvThresholdHit, "RecvThresholdHit");
BGE_SYSCTL_STAT(sc, ctx, "NIC DMA Read Queue Full",
@@ -4275,9 +4275,9 @@ bge_add_sysctls(struct bge_softc *sc)
BGE_SYSCTL_STAT(sc, ctx, "Undersized Packets",
children, rxstats.etherStatsUndersizePkts, "UndersizePkts");
BGE_SYSCTL_STAT(sc, ctx, "Inbound Range Length Errors",
- children, rxstats.inRangeLengthError, "RangeLengthError");
+ children, rxstats.inRangeLengthError, "inRangeLengthError");
BGE_SYSCTL_STAT(sc, ctx, "Outbound Range Length Errors",
- children, rxstats.outRangeLengthError, "RangeLengthError");
+ children, rxstats.outRangeLengthError, "outRangeLengthError");
tree = SYSCTL_ADD_NODE(ctx, schildren, OID_AUTO, "tx", CTLFLAG_RD,
NULL, "BGE TX Statistics");
@@ -4308,8 +4308,8 @@ bge_add_sysctls(struct bge_softc *sc)
children, txstats.dot3StatsExcessiveCollisions,
"ExcessiveCollisions");
BGE_SYSCTL_STAT(sc, ctx, "Late Collisions",
- children, txstats.dot3StatsExcessiveCollisions,
- "ExcessiveCollisions");
+ children, txstats.dot3StatsLateCollisions,
+ "LateCollisions");
BGE_SYSCTL_STAT(sc, ctx, "Outbound Unicast Packets",
children, txstats.ifHCOutUcastPkts, "UcastPkts");
BGE_SYSCTL_STAT(sc, ctx, "Outbound Multicast Packets",
@@ -4323,14 +4323,13 @@ bge_add_sysctls(struct bge_softc *sc)
children, txstats.ifOutDiscards, "Discards");
BGE_SYSCTL_STAT(sc, ctx, "Outbound Errors",
children, txstats.ifOutErrors, "Errors");
-
}
static int
bge_sysctl_stats(SYSCTL_HANDLER_ARGS)
{
struct bge_softc *sc;
- uint64_t result;
+ uint32_t result;
int base, offset;
sc = (struct bge_softc *)arg1;
@@ -4339,12 +4338,8 @@ bge_sysctl_stats(SYSCTL_HANDLER_ARGS)
base = BGE_MAC_STATS;
else
base = BGE_MEMWIN_START + BGE_STATS_BLOCK;
-
- result = ((uint64_t)(CSR_READ_4(sc, base + offset +
- offsetof(bge_hostaddr, bge_addr_hi))) << 32) |
- CSR_READ_4(sc, base + offset + offsetof(bge_hostaddr,
+ result = CSR_READ_4(sc, base + offset + offsetof(bge_hostaddr,
bge_addr_lo));
-
return (sysctl_handle_int(oidp, &result, sizeof(result), req));
}