Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2023 00:24:01 GMT
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 15d2f480b604 - stable/12 - e1000: Remove redundant disable_ulp for ich8lan
Message-ID:  <202302230024.31N0O1S8071526@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=15d2f480b604b4e2b7ca2cf51c7244d4ffa148e3

commit 15d2f480b604b4e2b7ca2cf51c7244d4ffa148e3
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-02-08 23:17:03 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
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
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302230024.31N0O1S8071526>