There was no values for time duration statistics for LPI in EEE.
Two byte mask has been added to filter the flags because F/W
returns the status only in two lower bytes.
Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Reviewed-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Reviewed-by: Galazka Krzysztof <krzysztof.galazka@intel.com>
Reviewed-by: Slawomir Laba <slawomirx.laba@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Reviewed-by: Michael Alice <alice.michael@intel.com>
Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
drivers/net/i40e/base/i40e_adminq_cmd.h | 1 +
drivers/net/i40e/base/i40e_common.c | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
@@ -2301,6 +2301,7 @@ struct i40e_aqc_run_phy_activity {
struct {
__le32 cmd_status;
#define I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC 0x4
+#define I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK 0xFFFF
__le32 data0;
__le32 data1;
} resp;
@@ -7248,7 +7248,8 @@ enum i40e_status_code i40e_get_lpi_duration(struct i40e_hw *hw,
if (retval)
return retval;
- if (cmd_status != I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC)
+ if ((cmd_status & I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK) !=
+ I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC)
return I40E_ERR_ADMIN_QUEUE_ERROR;
if (hw->phy.link_info.link_speed == I40E_LINK_SPEED_1GB &&
@@ -7262,7 +7263,8 @@ enum i40e_status_code i40e_get_lpi_duration(struct i40e_hw *hw,
if (retval)
return retval;
- if (cmd_status != I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC)
+ if ((cmd_status & I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK) !=
+ I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC)
return I40E_ERR_ADMIN_QUEUE_ERROR;
tx_time_dur = 0;
rx_time_dur = 0;