From: Wenzhuo Lu Date: Wed, 24 Jun 2015 03:26:10 +0000 (+0800) Subject: ixgbe/base: configure MDIO clock for X550em X-Git-Tag: spdx-start~8943 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=08f941e9251f1d93c2c4e70aa12fc033176e0a02;p=dpdk.git ixgbe/base: configure MDIO clock for X550em The MDIO clock needs to be configured for a specific speed for x550em. We expected this to be done automatically, but in the early days of the project this was not happening. We put code in to do this ourselves. Eventually, we decided that there is no harm in having SW do this all the time, so we may not remove this code in the future. 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 3c6dc97279..bb6db7d1cf 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -38,6 +38,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "ixgbe_common.h" #include "ixgbe_phy.h" +STATIC s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed); /** * ixgbe_init_ops_X550 - Inits func ptrs and MAC type @@ -1559,6 +1560,7 @@ s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw) s32 status; u32 ctrl = 0; u32 i; + u32 hlreg0; bool link_up = false; DEBUGFUNC("ixgbe_reset_hw_X550em"); @@ -1650,6 +1652,12 @@ mac_reset_top: hw->mac.num_rar_entries = 128; hw->mac.ops.init_rx_addrs(hw); + if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) { + /* Config MDIO clock speed. */ + hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0); + hlreg0 &= ~IXGBE_HLREG0_MDCSPD; + IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); + } if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP) ixgbe_setup_mux_ctl(hw);