From patchwork Thu Jul 18 17:13:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Zhang X-Patchwork-Id: 56704 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 416141DBF; Thu, 18 Jul 2019 10:18:12 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 5EBB5152A for ; Thu, 18 Jul 2019 10:18:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 01:18:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="195533491" Received: from npg-dpdk-zhangxiao.sh.intel.com ([10.67.110.190]) by fmsmga002.fm.intel.com with ESMTP; 18 Jul 2019 01:18:07 -0700 From: Xiao Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, haiyue.wang@intel.com, qi.z.zhang@intel.com, Xiao Zhang Date: Fri, 19 Jul 2019 01:13:41 +0800 Message-Id: <1563470021-16325-1-git-send-email-xiao.zhang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [DPDK] net/i40e: fix SFP X722 not work with FW4.16 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" FW4.16 of SFP X722 does not support setting TPID by set_switch_config adminq operation, for firmware version less than 4.16 TPID is set by register instead. Follow the same path with new firmware version for SFP X722 to make it work. Signed-off-by: Xiao Zhang --- drivers/net/i40e/i40e_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 2b9fc45..bf6dc2b 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -3708,7 +3708,9 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev, } /* 802.1ad frames ability is added in NVM API 1.7*/ - if (hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) { + /* FW4.16 for SFP x722 does not support set_switch_config option */ + if ((hw->flags & I40E_HW_FLAG_802_1AD_CAPABLE) && + hw->device_id != I40E_DEV_ID_SFP_X722) { if (qinq) { if (vlan_type == ETH_VLAN_TYPE_OUTER) hw->first_tag = rte_cpu_to_le_16(tpid);