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:
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to