Skip to contentSkip to conversation

e1000e: continue to init phy even when failed to disable ULP

PATCH Superseded Aaron Ma 5 participants 10 messages Jun 16, 2020 – Jul 28, 2020

Subsystems (3)
lore
Share & tools
lore

Aaron Ma

author
#0 lore raw

PATCH 1/1 e1000e: continue to init phy even when failed to disable ULP

After commit "e1000e: disable s0ix entry and exit flows for ME systems", some ThinkPads always failed to disable ulp by ME.
commit "e1000e: Warn if disabling ULP failed" break out of init phy:

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Chnage e_warn to e_dbg, in case it confuses.

---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +1 -2
index f999cca37a8a..63405819eb83 100644
@@ -302,8 +302,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 	hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown;
 	ret_val = e1000_disable_ulp_lpt_lp(hw, true);
 	if (ret_val) {
-		e_warn("Failed to disable ULP\n");
-		goto out;
+		e_dbg("Failed to disable ULP\n");
 	}
 
 	ret_val = hw->phy.ops.acquire(hw);
Signature · 1 line
2.26.2
#1 lore raw

Dear Aaron,

Thank you for your patch.

(Rant: Some more fallout from the other patch, which nobody reverted.)

Am 16.06.20 um 12:05 schrieb Aaron Ma:

Quoted 2 lines

After commit "e1000e: disable s0ix entry and exit flows for ME systems", some ThinkPads always failed to disable ulp by ME.

Please add the (short) commit hash from the master branch.

s/ulp/ULP/

Please list one ThinkPad as example.

Quoted 1 line

commit "e1000e: Warn if disabling ULP failed" break out of init phy:

1. Please add the closing quote ".
2. Please add the commit hash.

Quoted 10 lines

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Chnage e_warn to e_dbg, in case it confuses.

s/Chnage/Change/

Please leave the level warning, and improve the warning message instead, so a user knows what is going on.

Could you please add a Fixes: tag and the URL to the bug report?

Quoted 11 lines
---
  drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
index f999cca37a8a..63405819eb83 100644

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw) · line 308

Quoted 9 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +1 -2
@@ -302,8 +302,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
  	hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown;
  	ret_val = e1000_disable_ulp_lpt_lp(hw, true);
  	if (ret_val) {
-		e_warn("Failed to disable ULP\n");
-		goto out;
+		e_dbg("Failed to disable ULP\n");
  	}
 
  	ret_val = hw->phy.ops.acquire(hw);

Kind regards,

Paul

author
#2 lore raw
Quoted 7 lines · Paul Menzel

Dear Aaron,

Thank you for your patch.

(Rant: Some more fallout from the other patch, which nobody reverted.)

Would you like a revert?

Thanks,
Aaron

Quoted 55 lines

Am 16.06.20 um 12:05 schrieb Aaron Ma:

Quoted 2 lines

After commit "e1000e: disable s0ix entry and exit flows for ME systems", some ThinkPads always failed to disable ulp by ME.

Please add the (short) commit hash from the master branch.

s/ulp/ULP/

Please list one ThinkPad as example.

Quoted 1 line

commit "e1000e: Warn if disabling ULP failed" break out of init phy:

1.? Please add the closing quote ".
2.? Please add the commit hash.

Quoted 10 lines

error log:
[?? 42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP [?? 42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet [?? 42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Chnage e_warn to e_dbg, in case it confuses.

s/Chnage/Change/

Please leave the level warning, and improve the warning message instead, so a user knows what is going on.

Could you please add a Fixes: tag and the URL to the bug report?

Quoted 10 lines

---
? drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 +-- ? 1 file changed, 1 insertion(+), 2 deletions(-)

drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
index f999cca37a8a..63405819eb83 100644

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw) · line 308

Quoted 9 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +1 -2
@@ -302,8 +302,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 ????? hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown;
 ????? ret_val = e1000_disable_ulp_lpt_lp(hw, true);
 ????? if (ret_val) {
-??????? e_warn("Failed to disable ULP\n");
-??????? goto out;
+??????? e_dbg("Failed to disable ULP\n");
 ????? }
 ? ????? ret_val = hw->phy.ops.acquire(hw);
 

Kind regards,

Paul

#3 lore raw
In reply to Aaron Ma
Quoted 29 lines · Aaron Ma

After commit "e1000e: disable s0ix entry and exit flows for ME systems", some ThinkPads always failed to disable ulp by ME.
commit "e1000e: Warn if disabling ULP failed" break out of init phy:

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Chnage e_warn to e_dbg, in case it confuses.

---
drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
index f999cca37a8a..63405819eb83 100644

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw) · line 303

Quoted 2 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
@@ -302,8 +302,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 	hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown;
 	ret_val = e1000_disable_ulp_lpt_lp(hw, true);

If si0x entry isn't enabled, maybe skip calling e1000_disable_ulp_lpt_lp() altogether? We can use e1000e_check_me() to check that.

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw) · line 306

Quoted 5 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +1 -2
 	if (ret_val) {
-		e_warn("Failed to disable ULP\n");
-		goto out;
+		e_dbg("Failed to disable ULP\n");
 	}

The change of "e1000e: Warn if disabling ULP failed" is intentional to catch bugs like this.

Kai-Heng

Quoted 5 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
 	ret_val = hw->phy.ops.acquire(hw);
Signature · 1 line
2.26.2
author
#4 lore raw
Quoted 24 lines · Kai-Heng Feng
Quoted 24 lines · Aaron Ma

After commit "e1000e: disable s0ix entry and exit flows for ME systems", some ThinkPads always failed to disable ulp by ME.
commit "e1000e: Warn if disabling ULP failed" break out of init phy:

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Chnage e_warn to e_dbg, in case it confuses.

---
drivers/net/ethernet/intel/e1000e/ich8lan.c | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 11 lines

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw) · line 303

Quoted 7 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
index f999cca37a8a..63405819eb83 100644
@@ -302,8 +302,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 	hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown;
 	ret_val = e1000_disable_ulp_lpt_lp(hw, true);

If si0x entry isn't enabled, maybe skip calling e1000_disable_ulp_lpt_lp() altogether? We can use e1000e_check_me() to check that.

No, s0ix is different feature with ULP mode.

Aaron

Quoted 16 lines

drivers/net/ethernet/intel/e1000e/ich8lan.c static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw) · line 306

Quoted 5 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +1 -2
 	if (ret_val) {
-		e_warn("Failed to disable ULP\n");
-		goto out;
+		e_dbg("Failed to disable ULP\n");
 	}

The change of "e1000e: Warn if disabling ULP failed" is intentional to catch bugs like this.

Kai-Heng

Quoted 5 lines
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -0
 	ret_val = hw->phy.ops.acquire(hw);
Signature · 1 line
2.26.2
author
#5 lore raw

PATCH v2 1/1 e1000e: continue to init phy even when failed to disable ULP

In reply to Aaron Ma

After commit: e086ba2fccd ("e1000e: disable s0ix entry and exit flows
for ME systems").
ThinkPad P14s always failed to disable ULP by ME.
commit: 0c80cdbf33 ("e1000e: Warn if disabling ULP failed") break out of init phy:

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Fixes 0c80cdbf33 ("e1000e: Warn if disabling ULP failed")
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -1
index f999cca37a8a..be7475c5529d 100644
@@ -303,7 +303,6 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 	ret_val = e1000_disable_ulp_lpt_lp(hw, true);
 	if (ret_val) {
 		e_warn("Failed to disable ULP\n");
-		goto out;
 	}
 
 	ret_val = hw->phy.ops.acquire(hw);
Signature · 1 line
2.26.2
maintainer
#6 lore raw
Quoted 11 lines · On Wed, 17 Jun 2020 19:12:48 +0800 Aaron Ma wrote:

After commit: e086ba2fccd ("e1000e: disable s0ix entry and exit flows
for ME systems").
ThinkPad P14s always failed to disable ULP by ME.
commit: 0c80cdbf33 ("e1000e: Warn if disabling ULP failed") break out of init phy:

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error
Quoted 6 lines

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Fixes 0c80cdbf33 ("e1000e: Warn if disabling ULP failed")

Fixes tag: Fixes: 0c80cdbf33 ("e1000e: Warn if disabling ULP failed") Has these problem(s):
- SHA1 should be at least 12 digits long
Can be fixed by setting core.abbrev to 12 (or more) or (for git v2.11 or later) just making sure it is not set (or set to "auto").

author
#7 lore raw

PATCH v3 1/1 e1000e: continue to init phy even when failed to disable ULP

In reply to Aaron Ma

After commit: e086ba2fccda4 ("e1000e: disable s0ix entry and exit flows
for ME systems").
ThinkPad P14s always failed to disable ULP by ME.
commit: 0c80cdbf3320 ("e1000e: Warn if disabling ULP failed") break out of init phy:

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Fixes 0c80cdbf3320 ("e1000e: Warn if disabling ULP failed")
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -1
index f999cca37a8a..be7475c5529d 100644
@@ -303,7 +303,6 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 	ret_val = e1000_disable_ulp_lpt_lp(hw, true);
 	if (ret_val) {
 		e_warn("Failed to disable ULP\n");
-		goto out;
 	}
 
 	ret_val = hw->phy.ops.acquire(hw);
Signature · 1 line
2.26.2
author
#8 lore raw

PATCH v4 1/1 e1000e: continue to init phy even when failed to disable ULP

In reply to Aaron Ma

After 'commit e086ba2fccda4 ("e1000e: disable s0ix entry and exit flows
for ME systems")',
ThinkPad P14s always failed to disable ULP by ME.
'commit 0c80cdbf3320 ("e1000e: Warn if disabling ULP failed")' break out of init phy:

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Fixes 0c80cdbf3320 ("e1000e: Warn if disabling ULP failed")
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +0 -1
index f999cca37a8a..be7475c5529d 100644
@@ -303,7 +303,6 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
 	ret_val = e1000_disable_ulp_lpt_lp(hw, true);
 	if (ret_val) {
 		e_warn("Failed to disable ULP\n");
-		goto out;
 	}
 
 	ret_val = hw->phy.ops.acquire(hw);
Signature · 1 line
2.26.2
Tested-by on v4 1/1
#9 lore raw
Quoted 27 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Aaron Ma
Sent: Wednesday, June 17, 2020 11:55 PM
To: kuba at kernel.org; Kirsher, Jeffrey T <[email protected]>; davem at davemloft.net; intel-wired-lan at lists.osuosl.org; netdev at vger.kernel.org; linux-kernel at vger.kernel.org; Lifshits, Vitaly <[email protected]>; kai.heng.feng at canonical.com; Neftin, Sasha <[email protected]>
Subject: [Intel-wired-lan] [v4][PATCH] e1000e: continue to init phy even when failed to disable ULP

After 'commit e086ba2fccda4 ("e1000e: disable s0ix entry and exit flows
for ME systems")',
ThinkPad P14s always failed to disable ULP by ME.
'commit 0c80cdbf3320 ("e1000e: Warn if disabling ULP failed")' break out of init phy:

error log:

[   42.364753] e1000e 0000:00:1f.6 enp0s31f6: Failed to disable ULP
[   42.524626] e1000e 0000:00:1f.6 enp0s31f6: PHY Wakeup cause - Unicast
Packet
[   42.822476] e1000e 0000:00:1f.6 enp0s31f6: Hardware Error

When disable s0ix, E1000_FWSM_ULP_CFG_DONE will never be 1. If continue to init phy like before, it can work as before. iperf test result good too.

Quoted 5 lines
Fixes 0c80cdbf3320 ("e1000e: Warn if disabling ULP failed")
---
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 1 -
 1 file changed, 1 deletion(-)

I never did find a system that triggered the initial problem, but from a compatibility with the set of systems I do have working...