diff options
author | Glen Barber <gjb@FreeBSD.org> | 2014-06-27 22:05:21 +0000 |
---|---|---|
committer | Glen Barber <gjb@FreeBSD.org> | 2014-06-27 22:05:21 +0000 |
commit | 37a107a407cdb47ee0f4c4337e369e9973b34076 (patch) | |
tree | fce5301b062a855bc68b9cb76c6b5966c5a2acbe /sys/dev/sis | |
parent | d2f1b8f4d2975ca1ec3e7519f9d755af40f357e0 (diff) | |
download | src-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.c | 5 |
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[] = { |