From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <xiao.w.wang@intel.com>
Received: from mga03.intel.com (mga03.intel.com [134.134.136.65])
 by dpdk.org (Postfix) with ESMTP id F375E5698
 for <dev@dpdk.org>; Fri, 23 Sep 2016 07:16:13 +0200 (CEST)
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by orsmga103.jf.intel.com with ESMTP; 22 Sep 2016 22:16:12 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.30,380,1470726000"; d="scan'208";a="882950454"
Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202])
 by orsmga003.jf.intel.com with ESMTP; 22 Sep 2016 22:16:13 -0700
Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by
 fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Thu, 22 Sep 2016 22:16:11 -0700
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Thu, 22 Sep 2016 22:16:11 -0700
Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.118]) by
 SHSMSX152.ccr.corp.intel.com ([169.254.6.95]) with mapi id 14.03.0248.002;
 Fri, 23 Sep 2016 13:16:09 +0800
From: "Wang, Xiao W" <xiao.w.wang@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>, "Lu, Wenzhuo"
 <wenzhuo.lu@intel.com>
CC: "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH 17/39] net/ixgbe/base: access IOSF by host
 interface
Thread-Index: AQHSAHqQbKVZ3fsCvUucL2A2wh9KEqCAqKoAgAYIjbA=
Date: Fri, 23 Sep 2016 05:16:08 +0000
Message-ID: <B7F2E978279D1D49A3034B7786DACF406C21FA12@SHSMSX101.ccr.corp.intel.com>
References: <1472312902-16963-1-git-send-email-xiao.w.wang@intel.com>
 <1472312902-16963-18-git-send-email-xiao.w.wang@intel.com>
 <0a4cbb05-a03a-0666-7c22-8d61616d15d4@intel.com>
In-Reply-To: <0a4cbb05-a03a-0666-7c22-8d61616d15d4@intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ctpclassification: CTP_IC
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODMwZTllOTAtN2FhNy00ZjNlLTgzYzktNDU2ZmVkOWM2M2E4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik56ZytDdUtNejQyVGtIMzRNR2FoNXIwUk44bjRtd29YYmp4K0dZQXRMODg9In0=
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-dev] [PATCH 17/39] net/ixgbe/base: access IOSF by host
 interface
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Sep 2016 05:16:14 -0000

Hi Ferruh,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, September 20, 2016 1:04 AM
> To: Wang, Xiao W <xiao.w.wang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 17/39] net/ixgbe/base: access IOSF by host
> interface
>=20
> On 8/27/2016 4:48 PM, Xiao Wang wrote:
> > This patch makes sure that we access IOSF registers through the HIC
> > (host interface command) for the majority of X550em devices. All device=
s
> > with NVM are capable of using the HIC.
> >
> > For consistency all instances where the ixgbe_read/write_iosf_sb_reg_x5=
50
> > is called directly are converted to function pointer calls.
> >
> > Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> > ---
> >  drivers/net/ixgbe/base/ixgbe_phy.c  |  2 +-
> >  drivers/net/ixgbe/base/ixgbe_x550.c | 38 ++++++++++++++++++++++-------=
---
> -----
> >  2 files changed, 24 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c
> b/drivers/net/ixgbe/base/ixgbe_phy.c
> > index d33d0f8..ee8618f 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_phy.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_phy.c
> > @@ -741,7 +741,7 @@ s32 ixgbe_write_phy_reg_generic(struct ixgbe_hw
> *hw, u32 reg_addr,
> >  	DEBUGFUNC("ixgbe_write_phy_reg_generic");
> >
> >  	if (hw->mac.ops.acquire_swfw_sync(hw, gssr) =3D=3D IXGBE_SUCCESS) {
> > -		status =3D ixgbe_write_phy_reg_mdi(hw, reg_addr, device_type,
> > +		status =3D hw->phy.ops.write_reg_mdi(hw, reg_addr,
> device_type,
> >  						 phy_data);
>=20
> Is this IOSF register?

No, it's not. For consistency this patch converts this function call to fun=
ction pointer
call.  I will cover this in the v2 commit log.

>=20
> ...
>=20
> > @@ -4504,7 +4512,7 @@ s32 ixgbe_write_phy_reg_x550a(struct ixgbe_hw
> *hw, u32 reg_addr,
> >  	DEBUGFUNC("ixgbe_write_phy_reg_x550a");
> >
> >  	if (hw->mac.ops.acquire_swfw_sync(hw, mask) =3D=3D IXGBE_SUCCESS) {
> > -		status =3D ixgbe_write_phy_reg_mdi(hw, reg_addr, device_type,
> > +		status =3D hw->phy.ops.write_reg_mdi(hw, reg_addr,
> device_type,
>=20
> same question?
>=20
> >  						 phy_data);
> >  		hw->mac.ops.release_swfw_sync(hw, mask);
> >  	} else {
> >
>=20