aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sis
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2014-06-27 22:05:21 +0000
committerGlen Barber <gjb@FreeBSD.org>2014-06-27 22:05:21 +0000
commit37a107a407cdb47ee0f4c4337e369e9973b34076 (patch)
treefce5301b062a855bc68b9cb76c6b5966c5a2acbe /sys/dev/sis
parentd2f1b8f4d2975ca1ec3e7519f9d755af40f357e0 (diff)
downloadsrc-37a107a407cdb47ee0f4c4337e369e9973b34076.tar.gz
src-37a107a407cdb47ee0f4c4337e369e9973b34076.zip
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
Notes
Notes: svn path=/head/; revision=267985
Diffstat (limited to 'sys/dev/sis')
-rw-r--r--sys/dev/sis/if_sis.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c
index 4a95af63d8a6..09e2242065b0 100644
--- a/sys/dev/sis/if_sis.c
+++ b/sys/dev/sis/if_sis.c
@@ -2361,6 +2361,7 @@ sis_add_sysctls(struct sis_softc *sc)
{
struct sysctl_ctx_list *ctx;
struct sysctl_oid_list *children;
+ char tn[32];
int unit;
ctx = device_get_sysctl_ctx(sc->sis_dev);
@@ -2375,8 +2376,10 @@ sis_add_sysctls(struct sis_softc *sc)
* because it will consume extra CPU cycles for short frames.
*/
sc->sis_manual_pad = 0;
+ snprintf(tn, sizeof(tn), "dev.sis.%d.manual_pad", unit);
+ TUNABLE_INT_FETCH(tn, &sc->sis_manual_pad);
SYSCTL_ADD_INT(ctx, children, OID_AUTO, "manual_pad",
- CTLFLAG_RWTUN, &sc->sis_manual_pad, 0, "Manually pad short frames");
+ CTLFLAG_RW, &sc->sis_manual_pad, 0, "Manually pad short frames");
}
static device_method_t sis_methods[] = {