From nobody Thu Feb 23 00:23:20 2023 X-Original-To: dev-commits-src-branches@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 4PMYf04pljz3sfdk; Thu, 23 Feb 2023 00:23:20 +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 4PMYf04Jmdz3ww2; Thu, 23 Feb 2023 00:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677111800; 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=Dzcf66wgy6zIR0tIOdQRZBEC6VXvSBOI+RxfXEnYSz4=; b=GlpTiD+7a4h7GsKOPMp4nsFYeDydCuLcpJmC++n3z6rgNuiYM1w/9RTSVttKs2o1G3WyuC 0JFicviBZKgUaSYKBz8RPDukB4fc6dut+XIrZWyhbp61/kIbOY2LURZMibNmIp9MY+QoZ6 vBSq2H4b7ZyuBXy4PrcB/EvuK8Io5O9pRqVjytW/VasuEj36FRc+sl7wHjpmeYqVYgWegG sEahre8he07eWiE7ftsFmDvhB/pXf1OOy/qpSg+rHoRP70Ss9GMA0fibL6ubGygb4wHYuf z3XsvA3cdkp9wkebXBti6UMizJd5cVFWMvCKble0S82caeOp+BaWchLnK4PJ8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677111800; 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=Dzcf66wgy6zIR0tIOdQRZBEC6VXvSBOI+RxfXEnYSz4=; b=WCsa/VXZG+D3QsBP136b0pWZKSCWl7YJO+4+TybXKsA5CXtZ7uoYtvipBLj+FWAByN3j2z 9PUqHte7JPmChu8RNb7blVp3ASv1mYlKRdharLtZrs2cFDJrZAp1On6J4JbKQrQiFuVpT0 CKOf5EopZ7nUF/ACfSAUsahxMW4F80RB+Csfp3xSJJkm6ftvvPuKnxbrmqGZ8yLZWJ4Pzq YrvW36IxBW8e9YYDbwCd5bVFj8kObRJNn1ttoaj8DMxULQRM8cQjT22IOdO0O1f5nhDqgU PVMEoyNvdgvtL76I45vMDfz+O2apTSx/BLUSUy8AqFru57rQxDcG1M5+zjuIdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677111800; a=rsa-sha256; cv=none; b=gm6bqg84XMnZkFf47YDxEKpfBKW1DNqMEth0wYVqKSFRdNIMV/9dob9lQz54/F7j9o+yHa GvUxWRD4bkfEiI40DSzbyMMqGwQGf45nE8eV7tkAolQWw9aC32zulOUjgUHymr1Us6VVgL J1u4udSZeOh0iYCEtCz95E/PKMVFbiN0kuvhsYFJi9sspP0NQx0nAM4+JRKgDULU8uZodV Wavvre2CNz/S69yHxctv19dRuvqYe2kqHzarzxA4Uyu2nUBNRAJwGFCa/uvryYLuuk4/RC 2IOCnPHdgipKXJXt1rHyA39yfx/a3u7QuUpP5cIL3SnN8UqCcx8hNyNxU0Dovg== 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 4PMYf03MNbzMWQ; Thu, 23 Feb 2023 00:23:20 +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 31N0NKWs071346; Thu, 23 Feb 2023 00:23:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31N0NK7i071345; Thu, 23 Feb 2023 00:23:20 GMT (envelope-from git) Date: Thu, 23 Feb 2023 00:23:20 GMT Message-Id: <202302230023.31N0NK7i071345@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: 5e8a9a8193f9 - stable/13 - e1000: Remove redundant disable_ulp for ich8lan List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 5e8a9a8193f99bb0266f45546f1dbb6349c797db Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=5e8a9a8193f99bb0266f45546f1dbb6349c797db commit 5e8a9a8193f99bb0266f45546f1dbb6349c797db Author: Kevin Bowling AuthorDate: 2023-02-08 23:17:03 +0000 Commit: Kevin Bowling CommitDate: 2023-02-23 00:23:06 +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 3f3e2307f83f..9c640e7b9667 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 408b76c6876f..25f0c533094a 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1105,9 +1105,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 */