Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2011 18:07:57 +0000 (UTC)
From:      Jack F Vogel <jfv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r217797 - stable/8/sys/dev/ixgbe
Message-ID:  <201101241807.p0OI7vj7001470@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jfv
Date: Mon Jan 24 18:07:57 2011
New Revision: 217797
URL: http://svn.freebsd.org/changeset/base/217797

Log:
  MFC 217707 Don't do flow control if parameter is unchanged

Modified:
  stable/8/sys/dev/ixgbe/ixgbe.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- stable/8/sys/dev/ixgbe/ixgbe.c	Mon Jan 24 18:05:49 2011	(r217796)
+++ stable/8/sys/dev/ixgbe/ixgbe.c	Mon Jan 24 18:07:57 2011	(r217797)
@@ -5267,13 +5267,17 @@ static int
 ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS)
 {
 	int error;
+	int last = ixgbe_flow_control;
 	struct adapter *adapter;
 
 	error = sysctl_handle_int(oidp, &ixgbe_flow_control, 0, req);
-
 	if (error)
 		return (error);
 
+	/* Don't bother if it's not changed */
+	if (ixgbe_flow_control == last)
+		return (0);
+
 	adapter = (struct adapter *) arg1;
 	switch (ixgbe_flow_control) {
 		case ixgbe_fc_rx_pause:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101241807.p0OI7vj7001470>