From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D4E98A0471 for ; Fri, 19 Jul 2019 03:31:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 94A7F322C; Fri, 19 Jul 2019 03:31:03 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 946CB28EE; Fri, 19 Jul 2019 03:31:01 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 18:31:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,280,1559545200"; d="scan'208";a="162261878" Received: from npg-dpdk-zhangxiao.sh.intel.com ([10.67.110.190]) by orsmga008.jf.intel.com with ESMTP; 18 Jul 2019 18:30:58 -0700 From: Xiao Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, haiyue.wang@intel.com, qi.z.zhang@intel.com, Xiao Zhang , stable@dpdk.org Date: Fri, 19 Jul 2019 18:26:34 +0800 Message-Id: <1563531994-10076-1-git-send-email-xiao.zhang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563490319-53151-1-git-send-email-xiao.zhang@intel.com> References: <1563490319-53151-1-git-send-email-xiao.zhang@intel.com> Subject: [dpdk-dev] [v3] 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" set_switch_config adminq operation was used to set TPID for SFP X722 with FW4.16, but adminq is not supported which lead to failure. Since all FW versions of SFP X722 do not support adminq, disable adminq flag to use resigter setting to make it work. Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting") Cc: stable@dpdk.org Signed-off-by: Xiao Zhang --- 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