From: Wenzhuo Lu Date: Wed, 24 Jun 2015 03:26:03 +0000 (+0800) Subject: ixgbe/base: enable X550 FEC when EEE is disabled X-Git-Tag: spdx-start~8948 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=55c64cee04d36b65493601cb66b8a583c9d61c22;p=dpdk.git ixgbe/base: enable X550 FEC when EEE is disabled The FEC(Forward Error Correction) feature had been disabled because it increases power consumption. However, some customers want to use it. This patch enables FEC when EEE(Energy Efficient Ethernet) is disabled; FEC was already being disabled when EEE was enabled, but now both are done in the same function. The two features are not allowed to be enabled at the same time. The two features cannot both be disabled. If this ability is ever determined to be needed, we will need to define a new user parameter to control FEC independently of EEE. Fixes: d4c9ffd4fe1c ("ixgbe/base: disable X550em FEC to save power") Signed-off-by: Wenzhuo Lu Acked-by: Helin Zhang --- diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 07a52edc8e..e4e8cff84a 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -693,6 +693,10 @@ s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee) link_reg |= IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KR | IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KX; + /* Must disable FEC when EEE is enabled. */ + link_reg &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_FEC_REQ | + IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_FEC); + status = ixgbe_write_iosf_sb_reg_x550(hw, IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), IXGBE_SB_IOSF_TARGET_KR_PHY, link_reg); @@ -723,6 +727,10 @@ s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee) link_reg &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KR | IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KX); + /* Enable FEC when EEE is disabled. */ + link_reg |= (IXGBE_KRM_LINK_CTRL_1_TETH_AN_FEC_REQ | + IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_FEC); + status = ixgbe_write_iosf_sb_reg_x550(hw, IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id), IXGBE_SB_IOSF_TARGET_KR_PHY, link_reg); @@ -1638,8 +1646,6 @@ s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw) return status; reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_ENABLE; - reg_val &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_FEC_REQ | - IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_FEC); reg_val &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_KR | IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_KX);