[29/69] net/i40e/base: use TX_LPI_EN bit to fully turn off EEE
diff mbox series

Message ID 20191202074935.97629-30-xiaolong.ye@intel.com
State New
Delegated to: xiaolong ye
Headers show
Series
  • update for i40e base code
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ye Xiaolong Dec. 2, 2019, 7:48 a.m. UTC
Changing advertised EEE capabilities using 'Set PHY Config'
admin queue command does not switch off the EEE completely.
TX_LPI_EN bit in EEER has to be also cleared.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed-by: Kirsher Jeffrey T <jeffrey.t.kirsher@intel.com>
Reviewed-by: Joyner Eric <eric.joyner@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index b03a6bef2..d080e9340 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -7329,7 +7329,13 @@  enum i40e_status_code i40e_enable_eee(struct i40e_hw *hw, bool enable)
 			    I40E_AQ_PHY_FEC_CONFIG_MASK;
 
 	/* Set desired EEE state */
-	config.eee_capability = enable ? eee_capability : 0;
+	if (enable) {
+		config.eee_capability = eee_capability;
+		config.eeer |= I40E_PRTPM_EEER_TX_LPI_EN_MASK;
+	} else {
+		config.eee_capability = 0;
+		config.eeer &= ~I40E_PRTPM_EEER_TX_LPI_EN_MASK;
+	}
 
 	/* Save modified config */
 	status = i40e_aq_set_phy_config(hw, &config, NULL);