diff mbox series

[v1,1/1] Revert "e1000e: Fix possible HW unit hang after an s0ix exit"

Message ID 20220509085254.2436296-1-sasha.neftin@intel.com
State Accepted
Delegated to: Anthony Nguyen
Headers show
Series [v1,1/1] Revert "e1000e: Fix possible HW unit hang after an s0ix exit" | expand

Commit Message

Sasha Neftin May 9, 2022, 8:52 a.m. UTC
This reverts commit 1866aa0d0d6492bc2f8d22d0df49abaccf50cddd.

Commit 1866aa0d0d64("e1000e: Fix possible HW unit hang after an s0ix exit")
was a workaround for CSME problem to handle messages comes via H2ME
mailbox. This problem has been fixed by patch "e1000e: Enable the GPT
clock before sending message to the CSME".

Fixes: 3e55d231716e ("e1000e: Add handshake with the CSME to support S0ix")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214821
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
---
 drivers/net/ethernet/intel/e1000e/hw.h      |  1 -
 drivers/net/ethernet/intel/e1000e/ich8lan.c |  4 ----
 drivers/net/ethernet/intel/e1000e/ich8lan.h |  1 -
 drivers/net/ethernet/intel/e1000e/netdev.c  | 26 ---------------------
 4 files changed, 32 deletions(-)

Comments

Paul Menzel May 9, 2022, 9:23 a.m. UTC | #1
Dear Sasha,


Thank you for the patch.

Am 09.05.22 um 10:52 schrieb Sasha Neftin:
> This reverts commit 1866aa0d0d6492bc2f8d22d0df49abaccf50cddd.
> 
> Commit 1866aa0d0d64("e1000e: Fix possible HW unit hang after an s0ix exit")

Please add a space before the (.

> was a workaround for CSME problem to handle messages comes via H2ME
> mailbox. This problem has been fixed by patch "e1000e: Enable the GPT
> clock before sending message to the CSME".

Please send both patches as a series then.

> Fixes: 3e55d231716e ("e1000e: Add handshake with the CSME to support S0ix")
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214821
> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>

Should people affected by this (reporters, …) be added to the Cc: list, 
so they can test the patches?


Kind regards,

Paul


> ---
>   drivers/net/ethernet/intel/e1000e/hw.h      |  1 -
>   drivers/net/ethernet/intel/e1000e/ich8lan.c |  4 ----
>   drivers/net/ethernet/intel/e1000e/ich8lan.h |  1 -
>   drivers/net/ethernet/intel/e1000e/netdev.c  | 26 ---------------------
>   4 files changed, 32 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h
> index 13382df2f2ef..bcf680e83811 100644
> --- a/drivers/net/ethernet/intel/e1000e/hw.h
> +++ b/drivers/net/ethernet/intel/e1000e/hw.h
> @@ -630,7 +630,6 @@ struct e1000_phy_info {
>   	bool disable_polarity_correction;
>   	bool is_mdix;
>   	bool polarity_correction;
> -	bool reset_disable;
>   	bool speed_downgraded;
>   	bool autoneg_wait_to_complete;
>   };
> diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
> index e6c8e6d5234f..9466f65a6da7 100644
> --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
> +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
> @@ -2050,10 +2050,6 @@ static s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)
>   	bool blocked = false;
>   	int i = 0;
>   
> -	/* Check the PHY (LCD) reset flag */
> -	if (hw->phy.reset_disable)
> -		return true;
> -
>   	while ((blocked = !(er32(FWSM) & E1000_ICH_FWSM_RSPCIPHY)) &&
>   	       (i++ < 30))
>   		usleep_range(10000, 11000);
> diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
> index 638a3ddd7ada..2504b11c3169 100644
> --- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
> +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
> @@ -271,7 +271,6 @@
>   #define I217_CGFREG_ENABLE_MTA_RESET	0x0002
>   #define I217_MEMPWR			PHY_REG(772, 26)
>   #define I217_MEMPWR_DISABLE_SMB_RELEASE	0x0010
> -#define I217_MEMPWR_MOEM		0x1000
>   
>   /* Receive Address Initial CRC Calculation */
>   #define E1000_PCH_RAICC(_n)	(0x05F50 + ((_n) * 4))
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index c64102b29862..f1729940e46c 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -6991,21 +6991,8 @@ static __maybe_unused int e1000e_pm_suspend(struct device *dev)
>   	struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
>   	struct e1000_adapter *adapter = netdev_priv(netdev);
>   	struct pci_dev *pdev = to_pci_dev(dev);
> -	struct e1000_hw *hw = &adapter->hw;
> -	u16 phy_data;
>   	int rc;
>   
> -	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
> -	    hw->mac.type >= e1000_pch_adp) {
> -		/* Mask OEM Bits / Gig Disable / Restart AN (772_26[12] = 1) */
> -		e1e_rphy(hw, I217_MEMPWR, &phy_data);
> -		phy_data |= I217_MEMPWR_MOEM;
> -		e1e_wphy(hw, I217_MEMPWR, phy_data);
> -
> -		/* Disable LCD reset */
> -		hw->phy.reset_disable = true;
> -	}
> -
>   	e1000e_flush_lpic(pdev);
>   
>   	e1000e_pm_freeze(dev);
> @@ -7027,8 +7014,6 @@ static __maybe_unused int e1000e_pm_resume(struct device *dev)
>   	struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
>   	struct e1000_adapter *adapter = netdev_priv(netdev);
>   	struct pci_dev *pdev = to_pci_dev(dev);
> -	struct e1000_hw *hw = &adapter->hw;
> -	u16 phy_data;
>   	int rc;
>   
>   	/* Introduce S0ix implementation */
> @@ -7039,17 +7024,6 @@ static __maybe_unused int e1000e_pm_resume(struct device *dev)
>   	if (rc)
>   		return rc;
>   
> -	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
> -	    hw->mac.type >= e1000_pch_adp) {
> -		/* Unmask OEM Bits / Gig Disable / Restart AN 772_26[12] = 0 */
> -		e1e_rphy(hw, I217_MEMPWR, &phy_data);
> -		phy_data &= ~I217_MEMPWR_MOEM;
> -		e1e_wphy(hw, I217_MEMPWR, phy_data);
> -
> -		/* Enable LCD reset */
> -		hw->phy.reset_disable = false;
> -	}
> -
>   	return e1000e_pm_thaw(dev);
>   }
>
naamax.meir May 19, 2022, 9:49 a.m. UTC | #2
On 5/9/2022 11:52, Sasha Neftin wrote:
> This reverts commit 1866aa0d0d6492bc2f8d22d0df49abaccf50cddd.
> 
> Commit 1866aa0d0d64("e1000e: Fix possible HW unit hang after an s0ix exit")
> was a workaround for CSME problem to handle messages comes via H2ME
> mailbox. This problem has been fixed by patch "e1000e: Enable the GPT
> clock before sending message to the CSME".
> 
> Fixes: 3e55d231716e ("e1000e: Add handshake with the CSME to support S0ix")
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214821
> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
> ---
>   drivers/net/ethernet/intel/e1000e/hw.h      |  1 -
>   drivers/net/ethernet/intel/e1000e/ich8lan.c |  4 ----
>   drivers/net/ethernet/intel/e1000e/ich8lan.h |  1 -
>   drivers/net/ethernet/intel/e1000e/netdev.c  | 26 ---------------------
>   4 files changed, 32 deletions(-)
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h
index 13382df2f2ef..bcf680e83811 100644
--- a/drivers/net/ethernet/intel/e1000e/hw.h
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
@@ -630,7 +630,6 @@  struct e1000_phy_info {
 	bool disable_polarity_correction;
 	bool is_mdix;
 	bool polarity_correction;
-	bool reset_disable;
 	bool speed_downgraded;
 	bool autoneg_wait_to_complete;
 };
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index e6c8e6d5234f..9466f65a6da7 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -2050,10 +2050,6 @@  static s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)
 	bool blocked = false;
 	int i = 0;
 
-	/* Check the PHY (LCD) reset flag */
-	if (hw->phy.reset_disable)
-		return true;
-
 	while ((blocked = !(er32(FWSM) & E1000_ICH_FWSM_RSPCIPHY)) &&
 	       (i++ < 30))
 		usleep_range(10000, 11000);
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.h b/drivers/net/ethernet/intel/e1000e/ich8lan.h
index 638a3ddd7ada..2504b11c3169 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.h
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.h
@@ -271,7 +271,6 @@ 
 #define I217_CGFREG_ENABLE_MTA_RESET	0x0002
 #define I217_MEMPWR			PHY_REG(772, 26)
 #define I217_MEMPWR_DISABLE_SMB_RELEASE	0x0010
-#define I217_MEMPWR_MOEM		0x1000
 
 /* Receive Address Initial CRC Calculation */
 #define E1000_PCH_RAICC(_n)	(0x05F50 + ((_n) * 4))
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index c64102b29862..f1729940e46c 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6991,21 +6991,8 @@  static __maybe_unused int e1000e_pm_suspend(struct device *dev)
 	struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 	struct pci_dev *pdev = to_pci_dev(dev);
-	struct e1000_hw *hw = &adapter->hw;
-	u16 phy_data;
 	int rc;
 
-	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
-	    hw->mac.type >= e1000_pch_adp) {
-		/* Mask OEM Bits / Gig Disable / Restart AN (772_26[12] = 1) */
-		e1e_rphy(hw, I217_MEMPWR, &phy_data);
-		phy_data |= I217_MEMPWR_MOEM;
-		e1e_wphy(hw, I217_MEMPWR, phy_data);
-
-		/* Disable LCD reset */
-		hw->phy.reset_disable = true;
-	}
-
 	e1000e_flush_lpic(pdev);
 
 	e1000e_pm_freeze(dev);
@@ -7027,8 +7014,6 @@  static __maybe_unused int e1000e_pm_resume(struct device *dev)
 	struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 	struct pci_dev *pdev = to_pci_dev(dev);
-	struct e1000_hw *hw = &adapter->hw;
-	u16 phy_data;
 	int rc;
 
 	/* Introduce S0ix implementation */
@@ -7039,17 +7024,6 @@  static __maybe_unused int e1000e_pm_resume(struct device *dev)
 	if (rc)
 		return rc;
 
-	if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
-	    hw->mac.type >= e1000_pch_adp) {
-		/* Unmask OEM Bits / Gig Disable / Restart AN 772_26[12] = 0 */
-		e1e_rphy(hw, I217_MEMPWR, &phy_data);
-		phy_data &= ~I217_MEMPWR_MOEM;
-		e1e_wphy(hw, I217_MEMPWR, phy_data);
-
-		/* Enable LCD reset */
-		hw->phy.reset_disable = false;
-	}
-
 	return e1000e_pm_thaw(dev);
 }