Commit 030eed86 authored by David S. Miller's avatar David S. Miller

Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue

Tony Nguyen says:

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

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.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ec3f06b5 2c5e5abf
...@@ -2697,9 +2697,14 @@ static s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset, ...@@ -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) void e1000_power_up_phy_copper(struct e1000_hw *hw)
{ {
u16 mii_reg = 0; u16 mii_reg = 0;
int ret;
/* The PHY will retain its settings across a power down/up cycle */ /* 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; mii_reg &= ~BMCR_PDOWN;
e1e_wphy(hw, MII_BMCR, mii_reg); e1e_wphy(hw, MII_BMCR, mii_reg);
} }
...@@ -2715,9 +2720,14 @@ void e1000_power_up_phy_copper(struct e1000_hw *hw) ...@@ -2715,9 +2720,14 @@ void e1000_power_up_phy_copper(struct e1000_hw *hw)
void e1000_power_down_phy_copper(struct e1000_hw *hw) void e1000_power_down_phy_copper(struct e1000_hw *hw)
{ {
u16 mii_reg = 0; u16 mii_reg = 0;
int ret;
/* The PHY will retain its settings across a power down/up cycle */ /* 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; mii_reg |= BMCR_PDOWN;
e1e_wphy(hw, MII_BMCR, mii_reg); e1e_wphy(hw, MII_BMCR, mii_reg);
usleep_range(1000, 2000); usleep_range(1000, 2000);
...@@ -3037,7 +3047,11 @@ s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw) ...@@ -3037,7 +3047,11 @@ s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw)
return 0; return 0;
/* Do not apply workaround if in PHY loopback bit 14 set */ /* 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) if (data & BMCR_LOOPBACK)
return 0; return 0;
......
...@@ -610,7 +610,6 @@ ...@@ -610,7 +610,6 @@
#define IGC_MDIC_OP_WRITE 0x04000000 #define IGC_MDIC_OP_WRITE 0x04000000
#define IGC_MDIC_OP_READ 0x08000000 #define IGC_MDIC_OP_READ 0x08000000
#define IGC_MDIC_READY 0x10000000 #define IGC_MDIC_READY 0x10000000
#define IGC_MDIC_INT_EN 0x20000000
#define IGC_MDIC_ERROR 0x40000000 #define IGC_MDIC_ERROR 0x40000000
#define IGC_N0_QUEUE -1 #define IGC_N0_QUEUE -1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment