From 75a43979c76618f738ef2f2eb224c63538a40595 Mon Sep 17 00:00:00 2001 From: Wenzhuo Lu Date: Wed, 24 Jun 2015 11:26:00 +0800 Subject: [PATCH] ixgbe/base: fix X550em UniPHY link configuration In UniPHY we have 2 IOSF targets that are UniPHY related. We can write to PHY and PCS. In earlier times I've been told that there were 2 separate PCS targets for IOSF commands and that's why I implemented it with 2 defines and adding hw->bus.lan_id, but lately I confirmed with HW that FW takes care of which PCS "slice" we are talking to and is directing writes to correct one, so KX4_PCS1 target is dead now and we cannot use it. Signed-off-by: Wenzhuo Lu Acked-by: Helin Zhang --- drivers/net/ixgbe/base/ixgbe_type.h | 5 ++--- drivers/net/ixgbe/base/ixgbe_x550.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h index 23bf58a35c..fb27946aa0 100644 --- a/drivers/net/ixgbe/base/ixgbe_type.h +++ b/drivers/net/ixgbe/base/ixgbe_type.h @@ -3900,8 +3900,7 @@ struct ixgbe_hw { #define IXGBE_SB_IOSF_CTRL_BUSY_SHIFT 31 #define IXGBE_SB_IOSF_CTRL_BUSY (1 << IXGBE_SB_IOSF_CTRL_BUSY_SHIFT) #define IXGBE_SB_IOSF_TARGET_KR_PHY 0 -#define IXGBE_SB_IOSF_TARGET_KX4_UNIPHY 1 -#define IXGBE_SB_IOSF_TARGET_KX4_PCS0 2 -#define IXGBE_SB_IOSF_TARGET_KX4_PCS1 3 +#define IXGBE_SB_IOSF_TARGET_KX4_PHY 1 +#define IXGBE_SB_IOSF_TARGET_KX4_PCS 2 #endif /* _IXGBE_TYPE_H_ */ diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 3a4d7251bc..5eb0218314 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -1572,7 +1572,7 @@ s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw) u32 reg_val; status = ixgbe_read_iosf_sb_reg_x550(hw, IXGBE_KX4_LINK_CNTL_1, - IXGBE_SB_IOSF_TARGET_KX4_PCS0 + hw->bus.lan_id, ®_val); + IXGBE_SB_IOSF_TARGET_KX4_PCS, ®_val); if (status) return status; @@ -1592,7 +1592,7 @@ s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw) /* Restart auto-negotiation. */ reg_val |= IXGBE_KX4_LINK_CNTL_1_TETH_AN_RESTART; status = ixgbe_write_iosf_sb_reg_x550(hw, IXGBE_KX4_LINK_CNTL_1, - IXGBE_SB_IOSF_TARGET_KX4_PCS0 + hw->bus.lan_id, reg_val); + IXGBE_SB_IOSF_TARGET_KX4_PCS, reg_val); return status; } -- 2.20.1