[v3] IGC: Remove I225_I_PHY_ID checking
Checks
Commit Message
From: Mah Yock Gen <yock.gen.mah@intel.com>
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
<changelog>
Co-developed-by: Mah Yock Gen <yock.gen.mah@intel.com>
Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com>
Co-developed-by: Taripin Samuel <samuel.taripin@intel.com>
Signed-off-by: Taripin Samuel <samuel.taripin@intel.com>
Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com>
---
V3:
* Fixed coding style issue
V2:
* Removing i225-IT device id added in V1 patch, as it has been superseded
drivers/net/igc/base/igc_i225.c | 15 ++-------------
drivers/net/igc/base/igc_phy.c | 6 ++----
2 files changed, 4 insertions(+), 17 deletions(-)
Comments
> -----Original Message-----
> From: Mah, Yock Gen <yock.gen.mah@intel.com>
> Sent: Friday, September 2, 2022 8:18 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: [PATCH v3] IGC: Remove I225_I_PHY_ID checking
>
> From: Mah Yock Gen <yock.gen.mah@intel.com>
>
> 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
>
> <changelog>
>
> Co-developed-by: Mah Yock Gen <yock.gen.mah@intel.com>
> Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com>
> Co-developed-by: Taripin Samuel <samuel.taripin@intel.com>
> Signed-off-by: Taripin Samuel <samuel.taripin@intel.com>
> Signed-off-by: Mah Yock Gen <yock.gen.mah@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel with below minor changes.
1. rename title to "remove unnecessary PHY ID checking" to fix check-git-log warning
2. remove "<change log>" tag
3. remove duplicated "Signed-off-by"
Thanks
Qi
@@ -173,19 +173,8 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw)
phy->ops.write_reg = igc_write_phy_reg_gpy;
ret_val = igc_get_phy_id(hw);
- /* Verify phy id and set remaining function pointers */
- switch (phy->id) {
- case I225_I_PHY_ID:
- case I226_LM_PHY_ID:
- 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;
- default:
- ret_val = -IGC_ERR_PHY;
- goto out;
- }
+ phy->type = igc_phy_i225;
+
out:
return ret_val;
@@ -1474,8 +1474,7 @@ 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) |
@@ -1615,8 +1614,7 @@ 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) |