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 A987EA0545; Tue, 11 Oct 2022 13:04:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A68742D38; Tue, 11 Oct 2022 13:04:53 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id B8AA342D0C for ; Tue, 11 Oct 2022 13:04:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665486291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IEr47wGhbmH6slGRLDLf9hWS8vL/77/SQbhEm5fH7tw=; b=VtEZM87q4z1tieNstd5r9aOE5//CeaspyYTmpUI0SxoYqvSXEHoDQFkKKtVITIDMSRG8dK +TJq+ymEABXVVl8RT3GBDmVu0F63M6UT6K8SL15R/LSbbs8MzqIh5yjSXphJjKU1obtzcK uSU0fimOfnHhOzgd1VZpxANCCkZ8bzQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-68-9ZV5TptrPmK_wbbQ2GUINA-1; Tue, 11 Oct 2022 07:04:50 -0400 X-MC-Unique: 9ZV5TptrPmK_wbbQ2GUINA-1 Received: by mail-wm1-f71.google.com with SMTP id 2-20020a05600c268200b003c4290989e1so2091629wmt.2 for ; Tue, 11 Oct 2022 04:04:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IEr47wGhbmH6slGRLDLf9hWS8vL/77/SQbhEm5fH7tw=; b=pwddgJZT7+t+5VyQeFZWwks+FsIh5SULuBvnw/AQ9dsS1zjcTwhH0FuOkp38P6q92n ifF1HQj2kdudpPfPD0L7oM3ZDu9NoXLy+V5JW0Ty72TZHM6rLW3N68pt7Ca6cnHkxxwr WXdHSJhvGh0TvZD1+e4CJm8LUOCHgq3qN4tpCEwfTAu1YVSxAi9JVX/dNXWq06lC/5aR b5Ugzl8BX7sZu34J/NF439dk7TsE2ENAMMvbWL3x14Gm5NDe3PxItv4IYxAkAxNS6aqe QCRjXFj4sYtbWJo4pWO0srzJfPw/fiHIanR5EB/tpdAXiyyUQFJUTu+QmQ8FT4ePFDtH hDzQ== X-Gm-Message-State: ACrzQf0ZgPiXqnBHWbVWhWA8fak3/sy/gqt8eMx5knAJeBuWO/jX823c Y0K0tFF467vE7nNp4Q7dNH9nvMWwtZByUSnt3zoXvtUle/YBX+o/qTPLHpOwLkGZEc03kh2w1SP MU7M= X-Received: by 2002:a5d:5084:0:b0:22e:2f15:b521 with SMTP id a4-20020a5d5084000000b0022e2f15b521mr15715101wrt.271.1665486288985; Tue, 11 Oct 2022 04:04:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6VZuxK9Wj2lrC7XR2gML4GsD6lwcRdIGhEuv2gEvB5wbOVkYXNDqB2g70nT5xI/6YRqFE3AA== X-Received: by 2002:a5d:5084:0:b0:22e:2f15:b521 with SMTP id a4-20020a5d5084000000b0022e2f15b521mr15715086wrt.271.1665486288771; Tue, 11 Oct 2022 04:04:48 -0700 (PDT) Received: from [192.168.0.36] ([78.19.110.164]) by smtp.gmail.com with ESMTPSA id q5-20020adff945000000b0022ae401e9e0sm11020667wrr.78.2022.10.11.04.04.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Oct 2022 04:04:47 -0700 (PDT) Message-ID: <45165da1-25af-b735-f80d-a6b42592cf6c@redhat.com> Date: Tue, 11 Oct 2022 12:04:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 To: iotg.dpdk.ref.app@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org References: <20220829081436.29945-1-iotg.dpdk.ref.app@intel.com> <20220831225139.78201-1-iotg.dpdk.ref.app@intel.com> From: Kevin Traynor Subject: Re: [PATCH v2] IGC: Remove I225_I_PHY_ID checking In-Reply-To: <20220831225139.78201-1-iotg.dpdk.ref.app@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 31/08/2022 23:51, iotg.dpdk.ref.app@intel.com wrote: > 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; 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) |