From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 87271A0032; Thu, 1 Sep 2022 10:08:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 592AB41614; Thu, 1 Sep 2022 10:08:42 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 6C1AF40143 for ; Thu, 1 Sep 2022 00:51:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661986304; x=1693522304; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pvM2dsCQP/uzVc3p/BAJ9tUKfPZxX1qPYtmeDmc1aZc=; b=Q8Shi99UNDB6SvYNAnDA/cjkfPoIDI0glIZUUTzA3p+ilqUHL0LAukEQ A5cfR1X/Uq6jEzOIqm7oJ2a7aL2zTeVPuVBSUncdHzJfTbCh9BhjZAJiI WDOU45hX0U4IVe4mOx9iHHXKYiAEvZR3EZfwqIPmSNIrY4iR+8nTXafyl zLDPs80wL0juCAbFBFiVIpbDJqlTkCBYhPTK9QpkAOcdvIYy3dmHuhJNP RtBv0LnCRuRVaEPMLDlck7SoHHXzQOQ39B48w/6gj+qFsbLNqX380/Ddh hQ8Dvx4blmJ5kR7twy34E1h9iI09H2SpLDdqzgD+fuh7PBaB1NX3pWep1 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10456"; a="296345788" X-IronPort-AV: E=Sophos;i="5.93,279,1654585200"; d="scan'208";a="296345788" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2022 15:51:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,279,1654585200"; d="scan'208";a="642062265" Received: from andromeda02.png.intel.com ([10.221.253.198]) by orsmga008.jf.intel.com with ESMTP; 31 Aug 2022 15:51:42 -0700 From: iotg.dpdk.ref.app@intel.com To: qi.z.zhang@intel.com Cc: dev@dpdk.org Subject: [PATCH v2] IGC: Remove I225_I_PHY_ID checking Date: Thu, 1 Sep 2022 06:51:39 +0800 Message-Id: <20220831225139.78201-1-iotg.dpdk.ref.app@intel.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220829081436.29945-1-iotg.dpdk.ref.app@intel.com> References: <20220829081436.29945-1-iotg.dpdk.ref.app@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 01 Sep 2022 10:08:40 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: NSWE SWS DPDK Dev 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 --- 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; - /* 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) | -- 2.36.1