raw/ioat: allow perform operations function to return error
[dpdk.git] / drivers / net / i40e / i40e_ethdev.c
index 2076717..e6206a7 100644 (file)
@@ -27,6 +27,7 @@
 #include <rte_tailq.h>
 #include <rte_hash_crc.h>
 #include <rte_bitmap.h>
+#include <rte_os_shim.h>
 
 #include "i40e_logs.h"
 #include "base/i40e_prototype.h"
@@ -2306,7 +2307,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
        phy_conf.phy_type = is_up ? cpu_to_le32(phy_type_mask) : 0;
        phy_conf.phy_type_ext = is_up ? (I40E_AQ_PHY_TYPE_EXT_25G_KR |
                I40E_AQ_PHY_TYPE_EXT_25G_CR | I40E_AQ_PHY_TYPE_EXT_25G_SR |
-               I40E_AQ_PHY_TYPE_EXT_25G_LR) : 0;
+               I40E_AQ_PHY_TYPE_EXT_25G_LR | I40E_AQ_PHY_TYPE_EXT_25G_AOC |
+               I40E_AQ_PHY_TYPE_EXT_25G_ACC) : 0;
        phy_conf.fec_config = phy_ab.fec_cfg_curr_mod_ext_info;
        phy_conf.eee_capability = phy_ab.eee_capability;
        phy_conf.eeer = phy_ab.eeer_val;
@@ -11659,9 +11661,6 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
        uint32_t value = 0;
        uint32_t i;
 
-       if (!info || !info->length || !info->data)
-               return -EINVAL;
-
        if (hw->phy.link_info.module_type[0] == I40E_MODULE_TYPE_SFP)
                is_sfp = true;