From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 12E6F5323; Thu, 22 Jun 2017 05:07:09 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jun 2017 20:07:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,371,1493708400"; d="scan'208";a="1185561003" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 21 Jun 2017 20:07:08 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 21 Jun 2017 20:07:08 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 21 Jun 2017 20:07:08 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.197]) with mapi id 14.03.0319.002; Thu, 22 Jun 2017 11:07:06 +0800 From: "Chen, Jing D" To: "Wang, Xiao W" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v2] net/fm10k: initialize link status in device start Thread-Index: AQHS6wAhBE0G6XFFwE6TVe8SFWiaGKIwMuJQ Date: Thu, 22 Jun 2017 03:07:05 +0000 Message-ID: <4341B239C0EFF9468EE453F9E9F4604D3C66F6B1@shsmsx102.ccr.corp.intel.com> References: <1496228822-6753-1-git-send-email-xiao.w.wang@intel.com> <1498130403-121027-1-git-send-email-xiao.w.wang@intel.com> In-Reply-To: <1498130403-121027-1-git-send-email-xiao.w.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH v2] net/fm10k: initialize link status in device start X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 03:07:11 -0000 > -----Original Message----- > From: Wang, Xiao W > Sent: Thursday, June 22, 2017 7:20 PM > To: Chen, Jing D > Cc: dev@dpdk.org; stable@dpdk.org; Wang, Xiao W > Subject: [PATCH v2] net/fm10k: initialize link status in device start >=20 > Fm10k host driver can't manage PHY directly and provides a fake link stat= us by > always reporting LINK_UP. We should initialize link status in device star= t, > otherwise application will get LINK_DOWN status when LSC configured. >=20 > Fixes: 9ae6068c86da ("fm10k: add dev start/stop") > Cc: stable@dpdk.org >=20 > Signed-off-by: Xiao Wang > --- > v2: > * Rewrite commit message, add information about fm10k PHY. > * Always do link_update in dev_start. > --- > drivers/net/fm10k/fm10k_ethdev.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > b/drivers/net/fm10k/fm10k_ethdev.c > index 7172a0f..c5c4712 100644 > --- a/drivers/net/fm10k/fm10k_ethdev.c > +++ b/drivers/net/fm10k/fm10k_ethdev.c > @@ -84,6 +84,8 @@ static void fm10k_MAC_filter_set(struct rte_eth_dev > *dev, static void fm10k_set_rx_function(struct rte_eth_dev *dev); stati= c void > fm10k_set_tx_function(struct rte_eth_dev *dev); static int > fm10k_check_ftag(struct rte_devargs *devargs); > +static int fm10k_link_update(struct rte_eth_dev *dev, > + __rte_unused int wait_to_complete); >=20 > struct fm10k_xstats_name_off { > char name[RTE_ETH_XSTATS_NAME_SIZE]; > @@ -1166,6 +1168,8 @@ static inline int fm10k_glort_valid(struct fm10k_hw > *hw) > if (!(dev->data->dev_conf.rxmode.mq_mode & > ETH_MQ_RX_VMDQ_FLAG)) > fm10k_vlan_filter_set(dev, hw->mac.default_vid, true); >=20 > + fm10k_link_update(dev, 0); > + > return 0; > } >=20 Acked-by : Jing Chen