Skip to contentSkip to conversation

Intel Wired LAN Driver Updates 2022-09-08 (e1000e, igc)

GIT PULL New Tony Nguyen 2 participants 4 messages Sep 8, 2022 – Sep 16, 2022

Subsystems (3)
lore
Share & tools
lore

Tony Nguyen

author maintainer
#0 lore raw

This series contains updates to e1000e and igc drivers.

Li Zhong adds checking and handling for failed PHY register reads for e1000e.

Sasha removes an unused define for igc.

The following are changes since commit 75554fe00f941c3c3d9344e88708093a14d2b4b8:
net: sparx5: fix function return type to match actual type
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 1GbE

Li Zhong (1):
drivers/net/ethernet/e1000e: check return value of e1e_rphy()

Sasha Neftin (1):
igc: Remove IGC_MDIC_INT_EN definition

 drivers/net/ethernet/intel/e1000e/phy.c      | 20 +++++++++++++++++---
 drivers/net/ethernet/intel/igc/igc_defines.h |  1 -
 2 files changed, 17 insertions(+), 4 deletions(-)
Signature · 1 line
2.35.1
author maintainer
#1 lore raw

PATCH 1/2 drivers/net/ethernet/e1000e: check return value of e1e_rphy()

From: Li Zhong <[email protected]>

e1e_rphy() could return error value when reading PHY register, which needs to be checked.

---
 drivers/net/ethernet/intel/e1000e/phy.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/e1000e/phy.c +17 -3
index fd07c3679bb1..060b263348ce 100644
@@ -2697,9 +2697,14 @@ static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
 void e1000_power_up_phy_copper(struct e1000_hw *hw)
 {
 	u16 mii_reg = 0;
+	int ret;
 
 	/* The PHY will retain its settings across a power down/up cycle */
-	e1e_rphy(hw, MII_BMCR, &mii_reg);
+	ret = e1e_rphy(hw, MII_BMCR, &mii_reg);
+	if (ret) {
+		e_dbg("Error reading PHY register\n");
+		return;
+	}
 	mii_reg &= ~BMCR_PDOWN;
 	e1e_wphy(hw, MII_BMCR, mii_reg);
 }
@@ -2715,9 +2720,14 @@ void e1000_power_up_phy_copper(struct e1000_hw *hw)
 void e1000_power_down_phy_copper(struct e1000_hw *hw)
 {
 	u16 mii_reg = 0;
+	int ret;
 
 	/* The PHY will retain its settings across a power down/up cycle */
-	e1e_rphy(hw, MII_BMCR, &mii_reg);
+	ret = e1e_rphy(hw, MII_BMCR, &mii_reg);
+	if (ret) {
+		e_dbg("Error reading PHY register\n");
+		return;
+	}
 	mii_reg |= BMCR_PDOWN;
 	e1e_wphy(hw, MII_BMCR, mii_reg);
 	usleep_range(1000, 2000);
@@ -3037,7 +3047,11 @@ s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw)
 		return 0;
 
 	/* Do not apply workaround if in PHY loopback bit 14 set */
-	e1e_rphy(hw, MII_BMCR, &data);
+	ret_val = e1e_rphy(hw, MII_BMCR, &data);
+	if (ret_val) {
+		e_dbg("Error reading PHY register\n");
+		return ret_val;
+	}
 	if (data & BMCR_LOOPBACK)
 		return 0;
 
Signature · 1 line
2.35.1
author maintainer
#2 lore raw

PATCH 2/2 igc: Remove IGC_MDIC_INT_EN definition

In reply to Tony Nguyen

From: Sasha Neftin <[email protected]>

IGC_MDIC_INT_EN definition is not used. This patch comes to tidy up the driver code.

---
 drivers/net/ethernet/intel/igc/igc_defines.h | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_defines.h +0 -1
index 5c66b97c0cfa..4f9d7f013a95 100644
@@ -610,7 +610,6 @@
 #define IGC_MDIC_OP_WRITE	0x04000000
 #define IGC_MDIC_OP_READ	0x08000000
 #define IGC_MDIC_READY		0x10000000
-#define IGC_MDIC_INT_EN		0x20000000
 #define IGC_MDIC_ERROR		0x40000000
 
 #define IGC_N0_QUEUE		-1
Signature · 1 line
2.35.1
#3 lore raw
In reply to Tony Nguyen
This series was applied to netdev/net-next.git (master) by Tony Nguyen <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (master) by Tony Nguyen <[email protected]>:

Quoted 8 lines · On Thu, 8 Sep 2022 10:33:42 -0700 you wrote:

This series contains updates to e1000e and igc drivers.

Li Zhong adds checking and handling for failed PHY register reads for e1000e.

Sasha removes an unused define for igc.

[...]

Here is the summary with links:
- [net-next,1/2] drivers/net/ethernet/e1000e: check return value of e1e_rphy()

    https://git.kernel.org/netdev/net-next/c/fb1752c7df4d
  - [net-next,2/2] igc: Remove IGC_MDIC_INT_EN definition
    https://git.kernel.org/netdev/net-next/c/2c5e5abf1c42

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html