From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0AA78A0561; Wed, 3 Mar 2021 14:28:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9ADE1606DA; Wed, 3 Mar 2021 14:28:01 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id C677A4069B for ; Wed, 3 Mar 2021 14:28:00 +0100 (CET) IronPort-SDR: B8U3wpcwS26F4Wr3+KBaTS9s73NCgZIO1d9FOFap2vGBvlus9OoOzFiQJK7TAroku8wEHM+wwU ACz/44YkKtlA== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="186541598" X-IronPort-AV: E=Sophos;i="5.81,220,1610438400"; d="scan'208";a="186541598" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 05:27:59 -0800 IronPort-SDR: TjAWNQfx9WQ/FV37lQgtvtzUpGV3pQSY6WVAuveYGtAOuPL4AexJyfJ0ABxAcG+vzmml9Z/juP ozwsaj3lyXoA== X-IronPort-AV: E=Sophos;i="5.81,220,1610438400"; d="scan'208";a="445247132" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.219.174]) ([10.213.219.174]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 05:27:58 -0800 To: Lijun Ou Cc: dev@dpdk.org, linuxarm@openeuler.org References: <1614130139-42926-1-git-send-email-oulijun@huawei.com> <1614693534-27620-1-git-send-email-oulijun@huawei.com> <1614693534-27620-8-git-send-email-oulijun@huawei.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <531f25fa-4541-e942-6664-94119753a241@intel.com> Date: Wed, 3 Mar 2021 13:27:57 +0000 MIME-Version: 1.0 In-Reply-To: <1614693534-27620-8-git-send-email-oulijun@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH V2 07/14] net/hns3: fix device capabilities for copper media type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On 3/2/2021 1:58 PM, Lijun Ou wrote: > From: Huisong Li > > The configuration operation for PHY is implemented by firmware. And > a capability flag will be report to driver, which means the firmware > supports the PHY driver. However, the current implementation only > supports obtaining the capability bit, but some basic functions of > copper ports in driver, such as, the query of link status and link > info, are not supported. > > Therefore, it is necessary for driver to set the copper capability > bit to zero when the firmware supports the configuration of the PHY. > > Fixes: 438752358158 ("net/hns3: get device capability from firmware") > Fixes: 95e50325864c ("net/hns3: support copper media type") > Cc: stable@dpdk.org > > Signed-off-by: Huisong Li > --- > drivers/net/hns3/hns3_cmd.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c > index 32cd56b..ec34615 100644 > --- a/drivers/net/hns3/hns3_cmd.c > +++ b/drivers/net/hns3/hns3_cmd.c > @@ -423,8 +423,14 @@ static void hns3_parse_capability(struct hns3_hw *hw, > hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_PTP_B, 1); > if (hns3_get_bit(caps, HNS3_CAPS_TX_PUSH_B)) > hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_TX_PUSH_B, 1); > + /* > + * Currently, the query of link status and link info on copper ports > + * are not supported. So it is necessary for driver to set the copper > + * capability bit to zero when the firmware supports the configuration > + * of the PHY. > + */ > if (hns3_get_bit(caps, HNS3_CAPS_PHY_IMP_B)) > - hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_COPPER_B, 1); > + hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_COPPER_B, 0); > if (hns3_get_bit(caps, HNS3_CAPS_TQP_TXRX_INDEP_B)) > hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_INDEP_TXRX_B, 1); > if (hns3_get_bit(caps, HNS3_CAPS_STASH_B)) > Hi Lijun, I see this patch is to be accurate, but in next patch the link status is implemented and this patch practically reverted back completely, so I guess this patch can be dropped, what do you think?