Intel Wired LAN Driver Updates 2022-02-28
Subsystems (3)
Tony Nguyen
maintainerThis series contains updates to igc and e1000e drivers.
Corinna Vinschen ensures release of hardware sempahore on failed register read in igc_read_phy_reg_gpy().
Sasha does the same for the write variant, igc_write_phy_reg_gpy(). On e1000e, he resolves an issue with hardware unit hang on s0ix exit by disabling some bits and LAN connected device reset during power management flows. Lastly, he allows for TGP platforms to correct its NVM checksum.
v2: Fix Fixes tag on patch 3
The following are changes since commit caef14b7530c065fb85d54492768fa48fdb5093e:
net: ipa: fix a build dependency
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 1GbE
Corinna Vinschen (1):
igc: igc_read_phy_reg_gpy: drop premature return
Sasha Neftin (3):
igc: igc_write_phy_reg_gpy: drop premature return
e1000e: Fix possible HW unit hang after an s0ix exit
e1000e: Correct NVM checksum verification flow
drivers/net/ethernet/intel/e1000e/hw.h | 1 + drivers/net/ethernet/intel/e1000e/ich8lan.c | 8 +++++-- drivers/net/ethernet/intel/e1000e/ich8lan.h | 1 + drivers/net/ethernet/intel/e1000e/netdev.c | 26 +++++++++++++++++++++ drivers/net/ethernet/intel/igc/igc_phy.c | 4 ---- 5 files changed, 34 insertions(+), 6 deletions(-)
Signature · 1 line
2.31.1
Tony Nguyen
maintainerPATCH v2 1/4 igc: igc_read_phy_reg_gpy: drop premature return
From: Corinna Vinschen <[email protected]>
igc_read_phy_reg_gpy checks the return value from igc_read_phy_reg_mdic and if it's not 0, returns immediately. By doing this, it leaves the HW semaphore in the acquired state.
Drop this premature return statement, the function returns after releasing the semaphore immediately anyway.
--- drivers/net/ethernet/intel/igc/igc_phy.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/igc/igc_phy.c +0 -2
@@ -779,8 +779,6 @@ s32 igc_read_phy_reg_gpy(struct igc_hw *hw, u32 offset, u16 *data)if (ret_val)return ret_val; ret_val =igc_read_phy_reg_mdic (hw, offset, data); -if (ret_val) -return ret_val; hw->phy.ops.release (hw); }else { ret_val = igc_read_xmdio_reg(hw, (u16)offset, dev_addr,
Signature · 1 line
2.31.1
Tony Nguyen
maintainerPATCH v2 2/4 igc: igc_write_phy_reg_gpy: drop premature return
In reply to Tony NguyenFrom: Sasha Neftin <[email protected]>
Similar to "igc_read_phy_reg_gpy: drop premature return" patch. igc_write_phy_reg_gpy checks the return value from igc_write_phy_reg_mdic and if it's not 0, returns immediately. By doing this, it leaves the HW semaphore in the acquired state.
Drop this premature return statement, the function returns after releasing the semaphore immediately anyway.
--- drivers/net/ethernet/intel/igc/igc_phy.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/intel/igc/igc_phy.c +0 -2
@@ -746,8 +746,6 @@ s32 igc_write_phy_reg_gpy(struct igc_hw *hw, u32 offset, u16 data)if (ret_val)return ret_val; ret_val =igc_write_phy_reg_mdic (hw, offset, data); -if (ret_val) -return ret_val; hw->phy.ops.release (hw); }else { ret_val = igc_write_xmdio_reg(hw, (u16)offset, dev_addr,
Signature · 1 line
2.31.1
Tony Nguyen
maintainerPATCH v2 3/4 e1000e: Fix possible HW unit hang after an s0ix exit
In reply to Tony NguyenFrom: Sasha Neftin <[email protected]>
Disable the OEM bit/Gig Disable/restart AN impact and disable the PHY LAN connected device (LCD) reset during power management flows. This fixes possible HW unit hangs on the s0ix exit on some corporate ADL platforms.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214821
--- 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 insertions(+)
drivers/net/ethernet/intel/e1000e/hw.h +1 -0
@@ -630,6 +630,7 @@ 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; };
drivers/net/ethernet/intel/e1000e/ich8lan.c +4 -0
@@ -2050,6 +2050,10 @@ 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 );
drivers/net/ethernet/intel/e1000e/ich8lan.h +1 -0
@@ -271,6 +271,7 @@#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))
drivers/net/ethernet/intel/e1000e/netdev.c +26 -0
@@ -6987,8 +6987,21 @@ 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);
@@ -7010,6 +7023,8 @@ 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 */
@@ -7020,6 +7035,17 @@ 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); }
Signature · 1 line
2.31.1
Tony Nguyen
maintainerPATCH v2 4/4 e1000e: Correct NVM checksum verification flow
In reply to Tony NguyenFrom: Sasha Neftin <[email protected]>
Update MAC type check e1000_pch_tgp because for e1000_pch_cnp, NVM checksum update is still possible.
Emit a more detailed warning message.
Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1191663
--- drivers/net/ethernet/intel/e1000e/ich8lan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/e1000e/ich8lan.c +2 -2
@@ -4140,9 +4140,9 @@ static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)return ret_val;if (!(data & valid_csum_mask)) { -e_dbg ("NVM Checksum Invalid\n" ); +e_dbg ("NVM Checksum valid bit not set\n" ); -if (hw->mac.type < e1000_pch_cnp) { +if (hw->mac.type < e1000_pch_tgp) { data |= valid_csum_mask; ret_val =e1000_write_nvm (hw, word,1 , &data);if (ret_val)
Signature · 1 line
2.31.1
This series was applied to netdev/net.git (master) by Tony Nguyen <[email protected]>:
Hello:
This series was applied to netdev/net.git (master) by Tony Nguyen <[email protected]>:
Quoted 5 lines · On Mon, 28 Feb 2022 14:04:08 -0800 you wrote:
This series contains updates to igc and e1000e drivers.
Corinna Vinschen ensures release of hardware sempahore on failed register read in
igc_read_phy_reg_gpy().
Quoted 7 lines
Sasha does the same for the write variant,
igc_write_phy_reg_gpy(). On e1000e, he resolves an issue with hardware unit hang on s0ix exit by disabling some bits and LAN connected device reset during power management flows. Lastly, he allows for TGP platforms to correct its NVM checksum.[...]
Here is the summary with links:
- [net,v2,1/4] igc: igc_read_phy_reg_gpy: drop premature return
https://git.kernel.org/netdev/net/c/fda2635466cd - [net,v2,2/4] igc: igc_write_phy_reg_gpy: drop premature return https://git.kernel.org/netdev/net/c/c4208653a327 - [net,v2,3/4] e1000e: Fix possible HW unit hang after an s0ix exit https://git.kernel.org/netdev/net/c/1866aa0d0d64 - [net,v2,4/4] e1000e: Correct NVM checksum verification flow https://git.kernel.org/netdev/net/c/ffd24fa2fcc7
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html