From nobody Mon Oct 17 03:36:54 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MrN2t67dQz4fflY; Mon, 17 Oct 2022 03:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MrN2t5ZDfz3wZB; Mon, 17 Oct 2022 03:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665977814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PW8arxGrmx4v64UDFo1mifa//Usfw5/TcGM39U2MCY8=; b=Oy0RGAaOB5DZ0nQe2NCSBUyfMyBMEXnya0XO6+l0T/d72NrKnSwj/22bDPwsqQc/ATCN/O JiZ3o5x6LCkFYzvpttKWDpFUUP0wJAeQbzmQ97JOgXThZOVgAN8EheAICQIo6chhbZARzF lmADTf5coQ9DazSVfXkalzkenIq24Js1woC5n9KuuXydlAR5oIe3XLbZJ7OB1IYs/EsS91 bj11L5YXQ8Iv0X1VxBOu7G3p3Qg1MV7cSpN3469RSiiDn5tW0MfGll2T84G8scCz4O/tr0 iBJeE5WDCUaYKCmXvT5ryFEncZRq1lIQOYh9cqPR13sg7yRYVYVn+RHv0HjgQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MrN2t4bMlzgw1; Mon, 17 Oct 2022 03:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29H3as0i008923; Mon, 17 Oct 2022 03:36:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29H3as12008922; Mon, 17 Oct 2022 03:36:54 GMT (envelope-from git) Date: Mon, 17 Oct 2022 03:36:54 GMT Message-Id: <202210170336.29H3as12008922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: f2a0b610b840 - stable/13 - igc: remove unnecessary PHY ID checks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f2a0b610b84011d9de1a7a655a3ca8532cd6b8a7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665977814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PW8arxGrmx4v64UDFo1mifa//Usfw5/TcGM39U2MCY8=; b=ipZ0SrEMVv1Ns3nk836iYUCJeMqjTkffevaK0EUP1xELD4AYOVtwmfQD2utIfK3HKOcCZv JdEeieXDjalewPv0cz4ucZDsiE0e5Zh+5LUzpHSRFzFiN9IbN3T6uPV2T0zItGk7k1D9/Z RB0D5pS/sFV4ynbnxSxuEf7lFfGKIDPaf/ow9b2LumDG6jf+ItICQFNLLtTfkMO6lPD4/z sjxgDSko7pu2W9b7xPF4nCaF6l1y4l+GUpEfKYNPcWjnp6hZb5QNjuMDi85wmdP57G9oc0 YBl5FbKSz/Zrw/i9RBhr8lj3USJI7qLgksgeqjwmM0Ggi9FJQ+ufFWJSHWPPSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665977814; a=rsa-sha256; cv=none; b=XUU/MIDOhfDheopTZodRN3Svt5uaQIxVZuGk5wILX4UK+/YQO/NazQDE3sVNc3OnReInoY jqYqtP07i2wBb+H5YYjXZs95ViF5EV4QUt8Qua7fMolBcclVcn2Gldst3xPqz/2q82jCyV xPLhNFHPsQ3S9ZfbSyB7W1cldOpTlmlkRQcLYu3jKdoWH2wLR7gZvrz7zTXrSotHBO6daM humwUyLXc3pr/n562I7YGhKnD2RZei3WmtD8Z1YfOivxlfytq4gXVdXkPrOw0gu4TVya8V ITeZdl6siGo1UKsgKgs9zLHF2NFjHYP2HTcFnmjzNMqWBUWVxmLlB14+Lnyi7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f2a0b610b84011d9de1a7a655a3ca8532cd6b8a7 commit f2a0b610b84011d9de1a7a655a3ca8532cd6b8a7 Author: Mah Yock Gen AuthorDate: 2022-09-02 00:18:28 +0000 Commit: Kevin Bowling CommitDate: 2022-10-17 03:35:57 +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 Signed-off-by: Taripin Samuel Acked-by: Qi Zhang 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) |