aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2023-02-08 23:17:03 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2023-02-09 00:24:28 +0000
commitd36fbdb08ff567393a698aaf16f726275901ec96 (patch)
tree58316587ebefce4f704c808de0d8cb534451b7ba
parent1aa9a35f6361cc898e2323e1f2823771eb4161da (diff)
downloadsrc-d36fbdb08ff567393a698aaf16f726275901ec96.tar.gz
src-d36fbdb08ff567393a698aaf16f726275901ec96.zip
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
-rw-r--r--sys/dev/e1000/e1000_ich8lan.c10
-rw-r--r--sys/dev/e1000/if_em.c3
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
*/