From: Xiao Zhang Date: Fri, 19 Jul 2019 10:59:56 +0000 (+0800) Subject: net/i40e: fix SFP X722 with FW4.16 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9efa8d28b4daccda08ec0a2b8e45350fe089065f;p=dpdk.git net/i40e: fix SFP X722 with FW4.16 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 Reviewed-by: Haiyue Wang --- diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 8c9151787a..4e40b7ab52 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -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,