From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wenzhuo Lu Subject: [PATCH 25/26] ixgbe/base: added x550em PHY reset function Date: Fri, 5 Jun 2015 13:21:57 +0800 Message-ID: <1433481718-24253-26-git-send-email-wenzhuo.lu@intel.com> References: <1433481718-24253-1-git-send-email-wenzhuo.lu@intel.com> To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 302A9C3EA for ; Fri, 5 Jun 2015 07:23:02 +0200 (CEST) In-Reply-To: <1433481718-24253-1-git-send-email-wenzhuo.lu@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds x550em PHY reset function ixgbe_reset_phy_t_X550em. ixgbe_reset_phy_t_X550em calls the reset PHY generic, and then enables the x550em PHY LASI(Link Alarm Status Interrupt) interrupts. Signed-off-by: Wenzhuo Lu --- drivers/net/ixgbe/base/ixgbe_x550.c | 21 ++++++++++++++++++--- drivers/net/ixgbe/base/ixgbe_x550.h | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 9301686..8edc52c 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -1325,6 +1325,7 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw) ixgbe_setup_internal_phy_t_x550em; phy->ops.enter_lplu = ixgbe_enter_lplu_t_x550em; phy->ops.handle_lasi = ixgbe_handle_lasi_ext_t_x550em; + phy->ops.reset = ixgbe_reset_phy_t_X550em; break; default: break; @@ -1501,9 +1502,6 @@ s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw) return status; } - /* Configure Link Status Alarm and Temperature Threshold interrupts */ - status = ixgbe_enable_lasi_ext_t_x550em(hw); - return status; } @@ -2892,3 +2890,20 @@ s32 ixgbe_check_link_t_X550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed, return IXGBE_SUCCESS; } + +/** + * ixgbe_reset_phy_t_X550em - Performs X557 PHY reset and enables LASI + * @hw: pointer to hardware structure + **/ +s32 ixgbe_reset_phy_t_X550em(struct ixgbe_hw *hw) +{ + s32 status; + + status = ixgbe_reset_phy_generic(hw); + + if (status != IXGBE_SUCCESS) + return status; + + /* Configure Link Status Alarm and Temperature Threshold interrupts */ + return ixgbe_enable_lasi_ext_t_x550em(hw); +} diff --git a/drivers/net/ixgbe/base/ixgbe_x550.h b/drivers/net/ixgbe/base/ixgbe_x550.h index ead9e79..4cfd49c 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.h +++ b/drivers/net/ixgbe/base/ixgbe_x550.h @@ -101,5 +101,5 @@ s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw, bool autoneg_wait_to_complete); s32 ixgbe_check_link_t_X550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *link_up, bool link_up_wait_to_complete); +s32 ixgbe_reset_phy_t_X550em(struct ixgbe_hw *hw); #endif /* _IXGBE_X550_H_ */ - -- 1.9.3