From: Wei Dai Date: Tue, 24 Jan 2017 08:14:20 +0000 (+0800) Subject: net/ixgbe: return success when SFP is not present X-Git-Tag: spdx-start~4606 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=70efa56740ec394e46ca8f44da545724434a7f15;p=dpdk.git net/ixgbe: return success when SFP is not present Ignore the error=IXGBE_ERR_SFP_NOT_PRESENT when SFP is not present. If it is not ignored, testpmd will fail during 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 --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index ad63e5a046..4f30ad6405 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 "