git: d36fbdb08ff5 - main - e1000: Remove redundant disable_ulp for ich8lan
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Feb 2023 00:30:36 UTC
The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d36fbdb08ff567393a698aaf16f726275901ec96 commit d36fbdb08ff567393a698aaf16f726275901ec96 Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2023-02-08 23:17:03 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> 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 */