net/i40e: fix SFP X722 with FW4.16
authorXiao Zhang <xiao.zhang@intel.com>
Fri, 19 Jul 2019 10:59:56 +0000 (18:59 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:35 +0000 (14:31 +0200)
When NVM API version is 1.7 or above adminq operation to set TPID is
set as supported. This cause using adminq instead of registers.

For SFP X722 FW4.16, reported NVM API version is 1.8, and this cause
adminq operation to set as supported but it is not supported on FW4.16

Additional check added for SFP X722 to not enable adminq operation.

Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")
Cc: stable@dpdk.org
Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/i40e/i40e_ethdev.c

index 8c91517..4e40b7a 100644 (file)
@@ -1357,6 +1357,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
                PMD_INIT_LOG(ERR, "Failed to init adminq: %d", ret);
                return -EIO;
        }
+       /* Firmware of SFP x722 does not support adminq option */
+       if (hw->device_id == I40E_DEV_ID_SFP_X722)
+               hw->flags &= ~I40E_HW_FLAG_802_1AD_CAPABLE;
+
        PMD_INIT_LOG(INFO, "FW %d.%d API %d.%d NVM %02d.%02d.%02d eetrack %04x",
                     hw->aq.fw_maj_ver, hw->aq.fw_min_ver,
                     hw->aq.api_maj_ver, hw->aq.api_min_ver,