From nobody Thu Feb 23 00:24:01 2023 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 4PMYfn4097z3sfkQ; Thu, 23 Feb 2023 00:24:01 +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 4PMYfn3RWmz3x7y; Thu, 23 Feb 2023 00:24:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677111841; 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=aYo/wpeIOLgCGcAE/P5bO3E+8eF6gCDd8oYexdZu3ZE=; b=t4yN7Lnm/LHKujl7t3YpjlTjk8RkTEcwFkWm7dKR1DnuX6a0chknKpWhx97U1dJwkG+9Ue oWB0H278goyqVqDHo2OKW0IOX6/WIZOeeHo2L9JzDMG71p6lOo7eZE/GkgT5Dcseh4H/+a VC8BKzZG/UwSBHxg9jRUF3tJJpcDfCp/bLWPZoaDBKGBNf4thcYef43HuaPkaBSyJ3QyIf 7DhGRYvlNqPEPsIugNEYJcddcapweWzULKRw2yQvxNAEHM40GNrgkCfKNIlaDfcnBUvPv/ 4fFC4nCmr4ocHZRsCKNtJ7MHrBOBSbiKwTJAKHt0OO9qA0XKvkjiOyM9swRhow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677111841; 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=aYo/wpeIOLgCGcAE/P5bO3E+8eF6gCDd8oYexdZu3ZE=; b=VC4z7VC+sRTUE62m5AKEH7ygKR+PGgOC9nHnzWAj+0HFA4IWEjG9cwiRZZ+86iQH/RlpU1 0wld6s44WI7/EqAtQvFQHtJwT6LO+5eXKZZ2iR+oed3e/d7mFwwimwjZiqQcWT06IORW+m oVLGNp/Arg/fdiA1BJT5jBq8tLqYHaCjJYiSrStlgBUTE3zdC23pjKXI4NZ9KQ2PDRo9rh A5z9hwarhI86pIl0HJW75EMh63AhOAqY8JWZRol5NAH3Fz8USusBMwiSgiyCF34yWaasYh OPhppX0YPu/uzz8Q0R4nt5wVZTWftmsdvIFhmF9wNdvegmSsrVFWa7VRUzXqfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677111841; a=rsa-sha256; cv=none; b=gzOnh1ew+znQxSaoHNYIdRg1SjbTTSXezAzUEARNvGyyApwvK2A2UxLLz1D8pHe8W3MRfn 44i3YdRRoT5h1i/Dlhw8a+4KzXVZe6PbyIvJ6qsi2sBEjqoFriY4u4mrmCeRGr68AlskVJ uNQLHlUuqoaFl4QLnJjvQbdsfeSagEo+v/ITSoNy6kfObqntUQM4Rofm3+sjFscv6LeiNB UuNLWq1beJoMnJxMCoqAP4Yv83lJeXp6D3hRk/LEZxZUVbW+n+7jIH/heNKECuHhYVSdxJ 7pwST6WQrW0BiqlkVUV6cEqf+UA1LThpVietSxQ97wy8W9XkHVO9iheBZ8XfXg== 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 4PMYfn2VwdzM8b; Thu, 23 Feb 2023 00:24:01 +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 31N0O1EK071527; Thu, 23 Feb 2023 00:24:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31N0O1S8071526; Thu, 23 Feb 2023 00:24:01 GMT (envelope-from git) Date: Thu, 23 Feb 2023 00:24:01 GMT Message-Id: <202302230024.31N0O1S8071526@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: 15d2f480b604 - stable/12 - e1000: Remove redundant disable_ulp for ich8lan 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/12 X-Git-Reftype: branch X-Git-Commit: 15d2f480b604b4e2b7ca2cf51c7244d4ffa148e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=15d2f480b604b4e2b7ca2cf51c7244d4ffa148e3 commit 15d2f480b604b4e2b7ca2cf51c7244d4ffa148e3 Author: Kevin Bowling AuthorDate: 2023-02-08 23:17:03 +0000 Commit: Kevin Bowling CommitDate: 2023-02-23 00:23:46 +0000 e1000: Remove redundant disable_ulp for ich8lan This call only makes sense for ich8lan, and the shared code does it in e1000_setup_init_funcs() above this deletion. Obtained from: DPDK Sponsored by: BBOX.io Pull Request: https://github.com/freebsd/freebsd-src/pull/539 (cherry picked from commit d36fbdb08ff567393a698aaf16f726275901ec96) --- sys/dev/e1000/e1000_ich8lan.c | 10 +++++----- sys/dev/e1000/if_em.c | 3 --- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/dev/e1000/e1000_ich8lan.c b/sys/dev/e1000/e1000_ich8lan.c index 4dec3e22c3a9..b7c30555b55c 100644 --- a/sys/dev/e1000/e1000_ich8lan.c +++ b/sys/dev/e1000/e1000_ich8lan.c @@ -72,6 +72,7 @@ #include "e1000_api.h" +static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state); static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw); static void e1000_release_swflag_ich8lan(struct e1000_hw *hw); static s32 e1000_acquire_nvm_ich8lan(struct e1000_hw *hw); @@ -330,7 +331,9 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw) * so forcibly disable it. */ hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown; - e1000_disable_ulp_lpt_lp(hw, TRUE); + ret_val = e1000_disable_ulp_lpt_lp(hw, true); + if (ret_val) + ERROR_REPORT("Failed to disable ULP\n"); ret_val = hw->phy.ops.acquire(hw); if (ret_val) { @@ -1290,14 +1293,12 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx) if (!to_sx) { int i = 0; - /* Poll up to 5 seconds for Cable Disconnected indication */ while (!(E1000_READ_REG(hw, E1000_FEXT) & E1000_FEXT_PHY_CABLE_DISCONNECTED)) { /* Bail if link is re-acquired */ if (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU) return -E1000_ERR_PHY; - if (i++ == 100) break; @@ -1310,7 +1311,6 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx) if (!(E1000_READ_REG(hw, E1000_FEXT) & E1000_FEXT_PHY_CABLE_DISCONNECTED)) return 0; - } ret_val = hw->phy.ops.acquire(hw); @@ -4318,7 +4318,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) (u8)(data >> 8)); if (ret_val) break; - } + } /* Don't bother writing the segment valid bits if sector * programming failed. diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 869ce4fb4cf4..c4a4f54cb80d 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1106,9 +1106,6 @@ em_if_attach_pre(if_ctx_t ctx) em_print_fw_version(sc); - /* Disable ULP support */ - e1000_disable_ulp_lpt_lp(hw, true); - /* * Get Wake-on-Lan and Management info for later use */