From nobody Thu Feb 09 00:30:36 2023 X-Original-To: dev-commits-src-main@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 4PBySr5s4cz3nWgb; Thu, 9 Feb 2023 00:30:36 +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 4PBySr2bRXz4Ghj; Thu, 9 Feb 2023 00:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675902636; 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=ZWmXOC6K7S7lkVBIjRqzxVA8lOoJdJ9Q9oahtB/6cCw=; b=V6TrjssExn5jI9wQm4Skbbra3Ad2AxUTQFhwNKI564Fjc1PzwlWRLKkmCLsCyC/Pw5fn6A y+XkvZ1DB3rsiPRtwwjoixTM413O/irk3Y30kaxv/bb7+SM2UF1gjlnnOxxINY6ujPrJ3d nh4fEvbSW9H55kK9Ak4OpFHKrcDPlmj2TTuyfBpRUxHMl9zuX4waQN+b8B6DRoqM5D/RD7 yusdIdYOsBR7+kK/SxYUHhWp/F9tiVR6fR1rcyZg7Yas9Fz2xiQw2Cxnp/mKbqKu0EVZwI ZGOhiAQfJQNWAvgy5nJR4M3RSATnyOY1PPlg+35oZvR6ElgT0/ruc/ah7uvxyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675902636; 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=ZWmXOC6K7S7lkVBIjRqzxVA8lOoJdJ9Q9oahtB/6cCw=; b=F+bDnBV7xF9AVlCxmPTe5S0H4AUL0E+OX7Az3CJz/BzJHkbFftp0vjEjdMq8HwLO9+OIHE euSIso8V1qSZnPpCxz7i1235ea+m0bpFLHhX4MEAwVOa8rk57rH4j9fJ8+Dq8Kk63HyH0E X8wzBujkgLm5cmC1MFcT2gqYFXlSGmzKFOPb6mj31p1eDbycDv4FK0OHDihQjjYmBuMhFl d5DAwmZ3A5dwZGQDfUAnNKdY6fTjduZ5ueyqBdiv4a01inOTU9f0ru+7m4nGPCNjqMzU1E pZhGFFgtqyYskzT7uZ3O8MgciGZjr3QTwb0ymepoVIHhepqyQ9G+s/Lq4AZ0yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675902636; a=rsa-sha256; cv=none; b=FFiqS3e3GtNtmVzYhKxSxQPw0+KuSBDhjDAOo51B+Z4CjC8KCmFCBqJPyONLaGSZodzYOz Ul92P+n2Y5gdo6ifedmNmwtDTWqZGKhZ88U/IVCiVEhUoKLIkycOVBo88dQdBTiM3OMZiD 6W5crMkNNYJyMU8hC4/d2BkzJsrHWx/fbw9IApM87CIpnrb8PuYEB4HAKf+mY2e3tR4rjX qawV2o8VtrqXWG2mcUrIR7c8D4PnAI0tLEpTMn8Qz5WSmMvv+piWJnNlnJhcUaG4QdT9cO cdw6kxdgusmBOWQbjozNGhQLTFiErIt2SqSwyc7kNArO36Dy6yWp5oWSgcpK9Q== 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 4PBySr1KgFzHgk; Thu, 9 Feb 2023 00:30:36 +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 3190Ua9K062085; Thu, 9 Feb 2023 00:30:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3190Uao3062084; Thu, 9 Feb 2023 00:30:36 GMT (envelope-from git) Date: Thu, 9 Feb 2023 00:30:36 GMT Message-Id: <202302090030.3190Uao3062084@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: d36fbdb08ff5 - main - e1000: Remove redundant disable_ulp for ich8lan List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: d36fbdb08ff567393a698aaf16f726275901ec96 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d36fbdb08ff567393a698aaf16f726275901ec96 commit d36fbdb08ff567393a698aaf16f726275901ec96 Author: Kevin Bowling AuthorDate: 2023-02-08 23:17:03 +0000 Commit: Kevin Bowling CommitDate: 2023-02-09 00:24:28 +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 MFC after: 2 weeks Sponsored by: BBOX.io Pull Request: https://github.com/freebsd/freebsd-src/pull/539 --- 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 2ed0164598a6..ce5253cfae18 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1111,9 +1111,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 */