From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7E2EDC62C for ; Wed, 24 Jun 2015 05:26:39 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 23 Jun 2015 20:26:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,669,1427785200"; d="scan'208";a="749302340" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 23 Jun 2015 20:26:39 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t5O3QZaq019247; Wed, 24 Jun 2015 11:26:35 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t5O3QWmW012060; Wed, 24 Jun 2015 11:26:34 +0800 Received: (from wenzhuol@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t5O3QWxX012056; Wed, 24 Jun 2015 11:26:32 +0800 From: Wenzhuo Lu To: dev@dpdk.org Date: Wed, 24 Jun 2015 11:25:51 +0800 Message-Id: <1435116386-12010-3-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1435116386-12010-1-git-send-email-wenzhuo.lu@intel.com> References: <1435116386-12010-1-git-send-email-wenzhuo.lu@intel.com> Subject: [dpdk-dev] [PATCH 02/37] ixgbe/base: update Low Power Link Up to use MAC ops link X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2015 03:26:39 -0000 This patch updates x550em LPLU to use the MAC ops setup_link function pointer. This removes redundant code and provides iXFI and KR support between internal and external PHY. Signed-off-by: Wenzhuo Lu --- drivers/net/ixgbe/base/ixgbe_x550.c | 44 ++----------------------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index da312ba..fd46699 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -2556,48 +2556,8 @@ s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw) if (status != IXGBE_SUCCESS) return status; - /* Set AN advertizement to only include LCD */ - if (lcd_speed == IXGBE_LINK_SPEED_1GB_FULL) { - an_10g_cntl_reg &= ~IXGBE_MII_10GBASE_T_ADVERTISE; - autoneg_reg |= IXGBE_MII_1GBASE_T_ADVERTISE; - } - - if (lcd_speed == IXGBE_LINK_SPEED_10GB_FULL) { - an_10g_cntl_reg |= IXGBE_MII_10GBASE_T_ADVERTISE; - autoneg_reg &= ~IXGBE_MII_1GBASE_T_ADVERTISE; - } - - status = hw->phy.ops.write_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG, - IXGBE_MDIO_AUTO_NEG_DEV_TYPE, - an_10g_cntl_reg); - - if (status != IXGBE_SUCCESS) - return status; - - status = hw->phy.ops.write_reg(hw, - IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG, - IXGBE_MDIO_AUTO_NEG_DEV_TYPE, - autoneg_reg); - - if (status != IXGBE_SUCCESS) - return status; - - /* Restart PHY auto-negotiation. */ - status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL, - IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg); - - if (status != IXGBE_SUCCESS) - return status; - - autoneg_reg |= IXGBE_MII_RESTART; - - status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL, - IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg); - - if (status != IXGBE_SUCCESS) - return status; - - status = ixgbe_setup_ixfi_x550em(hw, &lcd_speed); + /* Setup link at least common link speed */ + status = hw->mac.ops.setup_link(hw, lcd_speed, false); return status; } -- 1.9.3