Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe - Fix wol_enable, fc and wufc sysctls to w...
details: https://anonhg.NetBSD.org/src/rev/64e007b2cf21
branches: trunk
changeset: 349301:64e007b2cf21
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Dec 05 10:05:11 2016 +0000
description:
- Fix wol_enable, fc and wufc sysctls to work correctly.
- Fix RCS Id.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 15 +++++++--------
sys/dev/pci/ixgbe/ixgbe_osdep.h | 3 ++-
2 files changed, 9 insertions(+), 9 deletions(-)
diffs (76 lines):
diff -r 3238620c9684 -r 64e007b2cf21 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Dec 05 08:53:01 2016 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Dec 05 10:05:11 2016 +0000
@@ -59,7 +59,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.52 2016/12/05 08:50:29 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.53 2016/12/05 10:05:11 msaitoh Exp $*/
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -4537,7 +4537,7 @@
/* for WoL-capable devices */
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) {
if (sysctl_createv(log, 0, &rnode, &cnode,
- CTLFLAG_READWRITE, CTLTYPE_INT,
+ CTLFLAG_READWRITE, CTLTYPE_BOOL,
"wol_enable", SYSCTL_DESCR("Enable/Disable Wake on LAN"),
ixgbe_sysctl_wol_enable, 0, (void *)adapter, 0, CTL_CREATE, CTL_EOL) != 0)
aprint_error_dev(dev, "could not create sysctl\n");
@@ -4921,9 +4921,8 @@
struct sysctlnode node = *rnode;
struct adapter *adapter = (struct adapter *)node.sysctl_data;
- node.sysctl_data = &adapter->fc;
fc = adapter->fc;
-
+ node.sysctl_data = &fc;
error = sysctl_lookup(SYSCTLFN_CALL(&node));
if (error != 0 || newp == NULL)
return error;
@@ -5261,18 +5260,18 @@
struct sysctlnode node = *rnode;
struct adapter *adapter = (struct adapter *)node.sysctl_data;
struct ixgbe_hw *hw = &adapter->hw;
- int new_wol_enabled;
+ bool new_wol_enabled;
int error = 0;
new_wol_enabled = hw->wol_enabled;
+ node.sysctl_data = &new_wol_enabled;
error = sysctl_lookup(SYSCTLFN_CALL(&node));
if ((error) || (newp == NULL))
return (error);
- new_wol_enabled = !!(new_wol_enabled);
if (new_wol_enabled == hw->wol_enabled)
return (0);
- if (new_wol_enabled > 0 && !adapter->wol_support)
+ if (new_wol_enabled && !adapter->wol_support)
return (ENODEV);
else
hw->wol_enabled = new_wol_enabled;
@@ -5415,7 +5414,7 @@
u32 new_wufc;
new_wufc = adapter->wufc;
-
+ node.sysctl_data = &new_wufc;
error = sysctl_lookup(SYSCTLFN_CALL(&node));
if ((error) || (newp == NULL))
return (error);
diff -r 3238620c9684 -r 64e007b2cf21 sys/dev/pci/ixgbe/ixgbe_osdep.h
--- a/sys/dev/pci/ixgbe/ixgbe_osdep.h Mon Dec 05 08:53:01 2016 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_osdep.h Mon Dec 05 10:05:11 2016 +0000
@@ -30,7 +30,8 @@
POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
-/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_osdep.h 294734 2016-01-25 16:18:53Z smh $*//*$NetBSD: ixgbe_osdep.h,v 1.15 2016/12/05 08:50:29 msaitoh Exp $*/
+/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_osdep.h 294734 2016-01-25 16:18:53Z smh $*/
+/*$NetBSD: ixgbe_osdep.h,v 1.16 2016/12/05 10:05:11 msaitoh Exp $*/
#ifndef _IXGBE_OS_H_
#define _IXGBE_OS_H_
Home |
Main Index |
Thread Index |
Old Index