From patchwork Wed Mar 1 06:04:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenzhuo Lu X-Patchwork-Id: 20974 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 24BE5F610; Wed, 1 Mar 2017 07:05:30 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 69B72374F for ; Wed, 1 Mar 2017 07:04:47 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 28 Feb 2017 22:04:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,223,1484035200"; d="scan'208";a="829601262" Received: from dpdk26.sh.intel.com ([10.239.128.228]) by FMSMGA003.fm.intel.com with ESMTP; 28 Feb 2017 22:04:46 -0800 From: Wenzhuo Lu To: dev@dpdk.org Cc: Wenzhuo Lu Date: Wed, 1 Mar 2017 14:04:48 +0800 Message-Id: <1488348292-118243-6-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1488348292-118243-1-git-send-email-wenzhuo.lu@intel.com> References: <1488348292-118243-1-git-send-email-wenzhuo.lu@intel.com> Subject: [dpdk-dev] [PATCH 5/9] net/ixgbe/base: complete hw init when SFP not present X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If SFP module is not present, reset_hw doesn't return success. SW should complete the initialization, or with specific module it resulted in no link when the module was later inserted. Signed-off-by: Wenzhuo Lu --- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index 9645667..df6fbf9 100644 --- a/drivers/net/ixgbe/base/ixgbe_common.c +++ b/drivers/net/ixgbe/base/ixgbe_common.c @@ -495,7 +495,7 @@ s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw) /* Reset the hardware */ status = hw->mac.ops.reset_hw(hw); - if (status == IXGBE_SUCCESS) { + if (status == IXGBE_SUCCESS || status == IXGBE_ERR_SFP_NOT_PRESENT) { /* Start the HW */ status = hw->mac.ops.start_hw(hw); }