DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: iotg.dpdk.ref.app@intel.com, qi.z.zhang@intel.com
Cc: dev@dpdk.org
Subject: Re: [PATCH v2] IGC: Remove I225_I_PHY_ID checking
Date: Tue, 11 Oct 2022 12:04:47 +0100	[thread overview]
Message-ID: <45165da1-25af-b735-f80d-a6b42592cf6c@redhat.com> (raw)
In-Reply-To: <20220831225139.78201-1-iotg.dpdk.ref.app@intel.com>

On 31/08/2022 23:51, iotg.dpdk.ref.app@intel.com wrote:
> From: NSWE SWS DPDK Dev <iotg.dpdk.ref.app@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
> Signed-off-by: NSWE SWS DPDK Dev <iotg.dpdk.ref.app@intel.com>
> ---
>   drivers/net/igc/base/igc_i225.c | 15 ++-------------
>   drivers/net/igc/base/igc_phy.c  |  6 ++----
>   2 files changed, 4 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/igc/base/igc_i225.c b/drivers/net/igc/base/igc_i225.c
> index 5f3d535490..af26602afb 100644
> --- a/drivers/net/igc/base/igc_i225.c
> +++ b/drivers/net/igc/base/igc_i225.c
> @@ -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;

The commit log says it is removing a check on the ID, but it does not 
say why these function pointers are being removed.

Why are they removed, were they not needed?

> -		/* TODO - complete with GPY PHY information */
> -		break;
> -	default:
> -		ret_val = -IGC_ERR_PHY;
> -		goto out;
> -	}
> +        phy->type = igc_phy_i225;
> +
>   
>   out:
>   	return ret_val;
> diff --git a/drivers/net/igc/base/igc_phy.c b/drivers/net/igc/base/igc_phy.c
> index 43bbe69bca..2906bae21a 100644
> --- a/drivers/net/igc/base/igc_phy.c
> +++ b/drivers/net/igc/base/igc_phy.c
> @@ -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) |


  parent reply	other threads:[~2022-10-11 11:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29  8:14 [PATCH] " iotg.dpdk.ref.app
2022-08-30 11:17 ` Zhang, Qi Z
2022-08-31 22:42   ` Mah, Yock Gen
2022-09-01  8:22     ` David Marchand
2022-09-02  7:01       ` David Marchand
2022-08-31 22:51 ` [PATCH v2] " iotg.dpdk.ref.app
2022-09-02  0:18   ` [PATCH v3] " yock.gen.mah
2022-09-04  1:55     ` Zhang, Qi Z
2022-10-11 11:04   ` Kevin Traynor [this message]
2022-10-12  7:45     ` [PATCH v2] " Mah, Yock Gen
2022-10-12  8:39       ` Kevin Traynor
2022-10-18 12:54         ` Kevin Traynor
2022-10-18 22:45           ` Mah, Yock Gen
2022-10-19  8:34             ` Kevin Traynor
2022-12-20 15:47               ` Kevin Traynor
2022-12-21  3:01                 ` Mah, Yock Gen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45165da1-25af-b735-f80d-a6b42592cf6c@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=dev@dpdk.org \
    --cc=iotg.dpdk.ref.app@intel.com \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).