git: 61b2374e0c05 - stable/12 - igc: remove unnecessary PHY ID checks
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 17 Oct 2022 03:38:32 UTC
The branch stable/12 has been updated by kbowling (ports committer):
URL: https://cgit.FreeBSD.org/src/commit/?id=61b2374e0c0517ec6942d4137b9f57fa22d05053
commit 61b2374e0c0517ec6942d4137b9f57fa22d05053
Author: Mah Yock Gen <yock.gen.mah@intel.com>
AuthorDate: 2022-09-02 00:18:28 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2022-10-17 03:37:22 +0000
igc: remove unnecessary PHY ID checks
I225 devices have only one PHY vendor. There is unnecessary to check
_I_PHY_ID during the link establishment and auto-negotiation process,
the checking also caused devices like i225-IT failed. This patch is to
remove the mentioned unnecessary checking.
Cc: stable@dpdk.org
Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com>
Signed-off-by: Taripin Samuel <samuel.taripin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Approved by: grehan
Differential Revision: https://reviews.freebsd.org/D36923
(cherry picked from commit 29d7f1ff579579711dd5a3325480728b8ed45f8c)
---
sys/dev/igc/igc_i225.c | 11 +----------
sys/dev/igc/igc_phy.c | 6 ++----
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/sys/dev/igc/igc_i225.c b/sys/dev/igc/igc_i225.c
index 95d7d1536184..91d221cee06b 100644
--- a/sys/dev/igc/igc_i225.c
+++ b/sys/dev/igc/igc_i225.c
@@ -169,16 +169,7 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw)
goto out;
ret_val = igc_get_phy_id(hw);
- /* Verify phy id and set remaining function pointers */
- switch (phy->id) {
- case I225_I_PHY_ID:
- default:
- phy->type = igc_phy_i225;
- phy->ops.set_d0_lplu_state = igc_set_d0_lplu_state_i225;
- phy->ops.set_d3_lplu_state = igc_set_d3_lplu_state_i225;
- /* TODO - complete with GPY PHY information */
- break;
- }
+ phy->type = igc_phy_i225;
out:
return ret_val;
diff --git a/sys/dev/igc/igc_phy.c b/sys/dev/igc/igc_phy.c
index a6823ddf7bac..d2ae7effbb41 100644
--- a/sys/dev/igc/igc_phy.c
+++ b/sys/dev/igc/igc_phy.c
@@ -310,8 +310,7 @@ static s32 igc_phy_setup_autoneg(struct igc_hw *hw)
return ret_val;
}
- if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
- hw->phy.id == I225_I_PHY_ID) {
+ if (phy->autoneg_mask & ADVERTISE_2500_FULL) {
/* Read the MULTI GBT AN Control Register - reg 7.32 */
ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK <<
MMD_DEVADDR_SHIFT) |
@@ -451,8 +450,7 @@ static s32 igc_phy_setup_autoneg(struct igc_hw *hw)
ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL,
mii_1000t_ctrl_reg);
- if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
- hw->phy.id == I225_I_PHY_ID)
+ if (phy->autoneg_mask & ADVERTISE_2500_FULL)
ret_val = phy->ops.write_reg(hw,
(STANDARD_AN_REG_MASK <<
MMD_DEVADDR_SHIFT) |