net/i40e: fix X722 judgement when disable adminq operation
diff mbox series

Message ID 1579137597-14076-1-git-send-email-wangzhike@jd.com
State New
Delegated to: xiaolong ye
Headers show
Series
  • net/i40e: fix X722 judgement when disable adminq operation
Related show

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Zhike Wang Jan. 16, 2020, 1:19 a.m. UTC
X722 SFPs have different flavors, eg I40E_DEV_ID_SFP_X722
/I40E_DEV_ID_SFP_I_X722. So instead we use mac.type to judge
whether it is X722 or not.

Fixes: 9efa8d28b ("net/i40e: fix SFP X722 with FW4.16")
Signed-off-by: Zhike Wang <wangzhike@jd.com>
---
 drivers/net/i40e/i40e_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5999c96..85ccb76 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1443,7 +1443,7 @@  static inline void i40e_config_automask(struct i40e_pf *pf)
 		return -EIO;
 	}
 	/* Firmware of SFP x722 does not support adminq option */
-	if (hw->device_id == I40E_DEV_ID_SFP_X722)
+	if (hw->mac.type == I40E_MAC_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",