Module Name: src
Committed By: msaitoh
Date: Wed Jan 23 09:47:52 UTC 2019
Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c
Log Message:
- 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.
To generate a diff of this commit:
cvs rdiff -u -r1.172 -r1.173 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.172 src/sys/dev/pci/ixgbe/ixgbe.c:1.173
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.172 Wed Jan 23 09:01:24 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c Wed Jan 23 09:47:52 2019
@@ -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_attach(device_t parent, device_t d
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 @@ ixgbe_attach(device_t parent, device_t d
/* 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 @@ ixgbe_init_locked(struct adapter *adapte
/* 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);