From patchwork Tue Jan 24 08:14:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Dai X-Patchwork-Id: 19929 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 CBDAD108D; Tue, 24 Jan 2017 09:18:30 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 3191EDE3 for ; Tue, 24 Jan 2017 09:18:28 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP; 24 Jan 2017 00:18:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.33,277,1477983600"; d="scan'208"; a="1098119185" Received: from dpdk4.bj.intel.com ([172.16.182.178]) by fmsmga001.fm.intel.com with ESMTP; 24 Jan 2017 00:18:26 -0800 From: Wei Dai To: dev@dpdk.org Cc: helin.zhang@intel.com, konstantin.ananyev@intel.com, Wei Dai Date: Tue, 24 Jan 2017 16:14:20 +0800 Message-Id: <1485245660-2127-1-git-send-email-wei.dai@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] net/ixgbe: correct error 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" Ignore the error=IXGBE_ERR_SFP_NOT_PRESENT when SFP is not present. If it is not ignored, testpmd will in the NIC initialization process. Ixgbe kernel driver ignores this error and works well. So DPDK does same thing. Signed-off-by: Wei Dai Signed-off-by: Helin Zhang Tested-by: Yuan Peng Acked-by: Wenzhuo Lu --- drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index bdf4e2b..ae7fb86 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -898,6 +898,8 @@ ixgbe_pf_reset_hw(struct ixgbe_hw *hw) IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); IXGBE_WRITE_FLUSH(hw); + if (status == IXGBE_ERR_SFP_NOT_PRESENT) + status = IXGBE_SUCCESS; return status; } @@ -1237,6 +1239,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) diag = ixgbe_init_hw(hw); } + if (diag == IXGBE_ERR_SFP_NOT_PRESENT) + diag = IXGBE_SUCCESS; + if (diag == IXGBE_ERR_EEPROM_VERSION) { PMD_INIT_LOG(ERR, "This device is a pre-production adapter/" "LOM. Please be aware there may be issues associated "