aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000
diff options
context:
space:
mode:
authorGuinan Sun <guinanx.sun@intel.com>2020-07-06 08:12:09 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2021-09-24 01:39:38 +0000
commitc2e24a65659ea09cafb093465f61f3708e237dbb (patch)
treed0beeab9ed0351a379bf3416e89e4b9182e1a802 /sys/dev/e1000
parent355177efed6c745049ff22aac58f8dc8dca08cc7 (diff)
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r--sys/dev/e1000/e1000_ich8lan.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/e1000/e1000_ich8lan.c b/sys/dev/e1000/e1000_ich8lan.c
index 4074eb68198c..0311fdb3fef6 100644
--- a/sys/dev/e1000/e1000_ich8lan.c
+++ b/sys/dev/e1000/e1000_ich8lan.c
@@ -1413,6 +1413,7 @@ out:
s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
{
s32 ret_val = E1000_SUCCESS;
+ u8 ulp_exit_timeout = 30;
u32 mac_reg;
u16 phy_reg;
int i = 0;
@@ -1434,10 +1435,12 @@ s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
E1000_WRITE_REG(hw, E1000_H2ME, mac_reg);
}
- /* Poll up to 300msec for ME to clear ULP_CFG_DONE. */
+ if (hw->mac.type == e1000_pch_cnp)
+ ulp_exit_timeout = 100;
+
while (E1000_READ_REG(hw, E1000_FWSM) &
E1000_FWSM_ULP_CFG_DONE) {
- if (i++ == 30) {
+ if (i++ == ulp_exit_timeout) {
ret_val = -E1000_ERR_PHY;
goto out;
}