Skip to contentSkip to conversation

e1000e: Enable GPT clock before sending message to CSME

PATCH New Sasha Neftin 4 participants 4 messages May 8, 2022 – May 19, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 e1000e: Enable GPT clock before sending message to CSME

On corporate (CSME) ADL systems, the Ethernet Controller may stop working ("HW unit hang") after exiting from the s0ix state. The reason is that CSME misses the message sent by the host. Enabling the dynamic GPT clock solves this problem. This clock is cleared upon HW initialization.

Fixes 3e55d231716e ("e1000e: Add handshake with the CSME to support S0ix")

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214821

---
v2:
Correct commit message and minor fix in comment.

 drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/e1000e/netdev.c +4 -0
index fa06f68c8c80..c64102b29862 100644
@@ -6494,6 +6494,10 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
 
 	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
 	    hw->mac.type >= e1000_pch_adp) {
+		/* Keep the GPT clock enabled for CSME */
+		mac_data = er32(FEXTNVM);
+		mac_data |= BIT(3);
+		ew32(FEXTNVM, mac_data);
 		/* Request ME unconfigure the device from S0ix */
 		mac_data = er32(H2ME);
 		mac_data &= ~E1000_H2ME_START_DPG;
Signature · 1 line
2.30.2
#1 lore raw

PATCH v2 1/1 e1000e: Enable GPT clock before sending message to CSME

Dear Sasha,

Am 08.05.22 um 09:09 schrieb Sasha Neftin:

Quoted 3 lines

On corporate (CSME) ADL systems, the Ethernet Controller may stop working ("HW unit hang") after exiting from the s0ix state. The reason is that CSME misses the message sent by the host.

What message exactly by the way?

Quoted 2 lines

Enabling the dynamic GPT clock solves this problem. This clock is cleared upon HW initialization.

?Enabling? sounds like it?s not running before. But reading the comment, it?s running. Could you make that more clear please? The GPT clock is running when in S0ix?

Lastly, is that a CSME firmware bug and what CSME firmware version was it?

Quoted 15 lines
Fixes 3e55d231716e ("e1000e: Add handshake with the CSME to support S0ix")

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214821

---
v2:
Correct commit message and minor fix in comment.

  drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/e1000e/netdev.c +0 -0
index fa06f68c8c80..c64102b29862 100644

drivers/net/ethernet/intel/e1000e/netdev.c static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter) · line 6503

Quoted 10 lines
drivers/net/ethernet/intel/e1000e/netdev.c +4 -0
@@ -6494,6 +6494,10 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
 
  	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
  	    hw->mac.type >= e1000_pch_adp) {
+		/* Keep the GPT clock enabled for CSME */
+		mac_data = er32(FEXTNVM);
+		mac_data |= BIT(3);
+		ew32(FEXTNVM, mac_data);
  		/* Request ME unconfigure the device from S0ix */
  		mac_data = er32(H2ME);
  		mac_data &= ~E1000_H2ME_START_DPG;

Kind regards,

Paul

#2 lore raw

PATCH v2 1/1 e1000e: Enable GPT clock before sending message to CSME

In reply to Sasha Neftin
Quoted 9 lines · Sasha Neftin

On corporate (CSME) ADL systems, the Ethernet Controller may stop working ("HW unit hang") after exiting from the s0ix state. The reason is that CSME misses the message sent by the host. Enabling the dynamic GPT clock solves this problem. This clock is cleared upon HW initialization.

Fixes 3e55d231716e ("e1000e: Add handshake with the CSME to support S0ix")

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214821

This commit fixed the hardware unit hang issue on my machine.

Quoted 21 lines

---
v2:
Correct commit message and minor fix in comment.

 drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/e1000e/netdev.c +4 -0
index fa06f68c8c80..c64102b29862 100644
@@ -6494,6 +6494,10 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
 
 	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
 	    hw->mac.type >= e1000_pch_adp) {
+		/* Keep the GPT clock enabled for CSME */
+		mac_data = er32(FEXTNVM);
+		mac_data |= BIT(3);
+		ew32(FEXTNVM, mac_data);
 		/* Request ME unconfigure the device from S0ix */
 		mac_data = er32(H2ME);
 		mac_data &= ~E1000_H2ME_START_DPG;
#3 lore raw

PATCH v2 1/1 e1000e: Enable GPT clock before sending message to CSME

In reply to Sasha Neftin
Quoted 6 lines · Sasha Neftin

On corporate (CSME) ADL systems, the Ethernet Controller may stop working ("HW unit hang") after exiting from the s0ix state. The reason is that CSME misses the message sent by the host. Enabling the dynamic GPT clock solves this problem. This clock is cleared upon HW initialization.

Fixes 3e55d231716e ("e1000e: Add handshake with the CSME to support S0ix")
Quoted 8 lines

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214821

---
v2:
Correct commit message and minor fix in comment.

  drivers/net/ethernet/intel/e1000e/netdev.c | 4 ++++
  1 file changed, 4 insertions(+)