[dpdk-stable] [v4] net/i40e: fix SFP X722 not work with FW4.16

Xiao Zhang xiao.zhang at intel.com
Fri Jul 19 12:59:56 CEST 2019


The code checked the NVM API version of FW to check if support adminq 
operation, when version is 1.7 or above adminq operation is support 
and the adminq flag will be set. The code will use adminq to set TPID if
the flags set or to use register. The NVM API version of SFP X722 old
versions are lowwer than 1.7 and for FW4.16 is 1.8. But FW4.16 of SFP
X722 does not support adminq operation, the legacy logic is not compatible
with device SFP X722 currently. Check the device id to unset adminq
flag to use resigter setting to make it work.

Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register
setting")
Cc: stable at dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
---
v4
Add more detailed information in the commit log.
v3
Modify the commit log to make it not confused and add fixed line.
v2
Unset adminq flag instead of only checking device id when set TPID.
v1
Check device id when setting TPID, use adminq if not SFP X722, else 
use register.
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2b9fc45..2b2c877 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1358,6 +1358,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,
-- 
2.7.4



More information about the stable mailing list