Module Name:    src
Committed By:   msaitoh
Date:           Fri Apr 28 10:24:45 UTC 2017

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 Fix a bug that reading hw.ixgM.qN.interrupt_rate cause the interrupt
throtting rate register to 0. Check sysctl read/write correctly...


To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.80 src/sys/dev/pci/ixgbe/ixgbe.c:1.81
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.80	Fri Mar  3 04:37:05 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Fri Apr 28 10:24:45 2017
@@ -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.80 2017/03/03 04:37:05 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.81 2017/04/28 10:24:45 msaitoh Exp $*/
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -4490,7 +4490,7 @@ ixgbe_sysctl_interrupt_rate_handler(SYSC
 		rate = 0;
 	node.sysctl_data = &rate;
 	error = sysctl_lookup(SYSCTLFN_CALL(&node));
-	if (error)
+	if (error || newp == NULL)
 		return error;
 	reg &= ~0xfff; /* default, no limitation */
 	ixgbe_max_interrupt_rate = 0;

Reply via email to