From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAA98C76195 for ; Fri, 19 Jul 2019 15:30:17 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 5A1122184E for ; Fri, 19 Jul 2019 15:30:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A1122184E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 24F322BC7; Fri, 19 Jul 2019 17:30:16 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id BC5F6137C; Fri, 19 Jul 2019 17:30:13 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2019 08:30:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,282,1559545200"; d="scan'208";a="367292441" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 19 Jul 2019 08:30:12 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 19 Jul 2019 08:30:12 -0700 Received: from fmsmsx120.amr.corp.intel.com ([169.254.15.50]) by FMSMSX153.amr.corp.intel.com ([169.254.9.7]) with mapi id 14.03.0439.000; Fri, 19 Jul 2019 08:30:12 -0700 From: "Stillwell Jr, Paul M" To: "Zhang, Xiao" , "dev@dpdk.org" CC: "Xing, Beilei" , "Wang, Haiyue" , "Zhang, Qi Z" , "Zhang, Xiao" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16 Thread-Index: AQHVPdZV/amlVRkjy0KoVDz8CW0Go6bSEMRw Date: Fri, 19 Jul 2019 15:30:12 +0000 Message-ID: References: <1563531994-10076-1-git-send-email-xiao.zhang@intel.com> <1563533997-10878-1-git-send-email-xiao.zhang@intel.com> In-Reply-To: <1563533997-10878-1-git-send-email-xiao.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2RkZmZmOWEtZTZlNS00YWZhLWE4OGItNGVjNmZkZTI0ZGVjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ0FYUld3Q05pV0lndXhjb1M2SW1zRlBmdFpuVng4S2hzR2NJdUpyUkhzZ1F3RVpKRXdHYXVLNHVZaUxKSDYxSyJ9 x-originating-ip: [10.1.200.107] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [v4] 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" > -----Original Message----- > From: dev On Behalf Of Xiao Zhang > Sent: Friday, July 19, 2019 4:00 AM > To: dev@dpdk.org > Cc: Xing, Beilei ; Wang, Haiyue > ; Zhang, Qi Z ; Zhang, Xiao > ; stable@dpdk.org > Subject: [dpdk-dev] [v4] net/i40e: fix SFP X722 not work with FW4.16 >=20 > 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 t= he > adminq flag will be set. The code will use adminq to set TPID if the flag= s 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 compatibl= e > with device SFP X722 currently. Check the device id to unset adminq flag = to > use resigter setting to make it work. >=20 Sorry, I'm still confused about what this patch is doing. From the commit m= essage it seems like there are a couple of conditions: If the device is X722 Then if FW < 1.7 then use register to set TPID Else use adminq to set TPID The change in the code is only looking to see if the device is X722 and not= doing any other checking of FW version. Am I misunderstanding the commit message, the patch, or both? > Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register > setting") > Cc: stable@dpdk.org >=20 > Signed-off-by: Xiao Zhang > --- > 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(+) >=20 > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.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 =3D=3D I40E_DEV_ID_SFP_X722) > + hw->flags &=3D ~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