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 - Move the location of calling setup_eee()...



details:   https://anonhg.NetBSD.org/src/rev/a66a60b0039e
branches:  trunk
changeset: 448165:a66a60b0039e
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Jan 23 09:47:52 2019 +0000

description:
- Move the location of calling setup_eee() in ixgbe_attach(). The previous
  location was too early. The new location is before calling
  ixgbe_set_phy_power().
- Restore call of setup_eee() in ixgbe_init_locked(). It was removed in
  rev. 1.99 (FreeBSD r320688).
- When calling setup_eee(), pass enable/disable correctly.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 820a7e756804 -r a66a60b0039e sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Wed Jan 23 09:01:24 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Wed Jan 23 09:47:52 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.172 2019/01/23 09:01:24 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.173 2019/01/23 09:47:52 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -905,10 +905,6 @@
                ixgbe_check_fan_failure(adapter, esdp, FALSE);
        }
 
-       /* Enable EEE power saving */
-       if (adapter->feat_en & IXGBE_FEATURE_EEE)
-               hw->mac.ops.setup_eee(hw, TRUE);
-
        /* Set an initial default flow control value */
        hw->fc.requested_mode = ixgbe_flow_control;
 
@@ -1169,6 +1165,11 @@
        /* Enable the optics for 82599 SFP+ fiber */
        ixgbe_enable_tx_laser(hw);
 
+       /* Enable EEE power saving */
+       if (adapter->feat_cap & IXGBE_FEATURE_EEE)
+               hw->mac.ops.setup_eee(hw,
+                   adapter->feat_en & IXGBE_FEATURE_EEE);
+
        /* Enable power to the phy. */
        ixgbe_set_phy_power(hw, TRUE);
 
@@ -4082,6 +4083,11 @@
        /* Set moderation on the Link interrupt */
        ixgbe_eitr_write(adapter, adapter->vector, IXGBE_LINK_ITR);
 
+       /* Enable EEE power saving */
+       if (adapter->feat_cap & IXGBE_FEATURE_EEE)
+               hw->mac.ops.setup_eee(hw,
+                   adapter->feat_en & IXGBE_FEATURE_EEE);
+
        /* Enable power to the phy. */
        ixgbe_set_phy_power(hw, TRUE);
 



Home | Main Index | Thread Index | Old Index