From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753391AbcDOCxx (ORCPT ); Thu, 14 Apr 2016 22:53:53 -0400 Received: from mail-db3on0067.outbound.protection.outlook.com ([157.55.234.67]:62299 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752079AbcDOCxv convert rfc822-to-8bit (ORCPT ); Thu, 14 Apr 2016 22:53:51 -0400 From: Fugang Duan To: Philippe Reynes , "davem@davemloft.net" , "decot@googlers.com" , "f.fainelli@gmail.com" CC: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: RE: [PATCH 3/3] fec: move to new ethtool api {get|set}_link_ksettings Thread-Topic: [PATCH 3/3] fec: move to new ethtool api {get|set}_link_ksettings Thread-Index: AQHRlp3pgprxIw/2WUmYYoGtFzv5DZ+KUjEA Date: Fri, 15 Apr 2016 02:38:11 +0000 Message-ID: References: <1460673301-10599-1-git-send-email-tremyfr@gmail.com> <1460673301-10599-4-git-send-email-tremyfr@gmail.com> In-Reply-To: <1460673301-10599-4-git-send-email-tremyfr@gmail.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [199.59.226.141] x-ms-office365-filtering-correlation-id: a43869c7-b19a-4eb0-29b1-08d364d6fc8a x-microsoft-exchange-diagnostics: 1;VI1PR0401MB1855;5:YEuS5qqsmBgCvV+zKemjUm/RcZBv0b4YNl9TeyYZS9R3vg2LG3a0Wx78uFl7LW8C33X6kRDvF9oqnffpCwTp3LDbCh1gxgWOuH6W4b3HvD2GszDiZBrezTpSjqnQAFeB/oPcJA3x2xH1Lvop+Qe4IQ==;24:D3JDMHijnP7PhmCeVEIWg5D9/mgEdrgrHi49mjjs6tdyLNULop9udPAtBxTdklwoM90BssjlTx0xO2hlSJRhsAvwRRaNUY5lVWHGorDZioQ= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB1855; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:VI1PR0401MB1855;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB1855; x-forefront-prvs: 0913EA1D60 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(3900700001)(586003)(2906002)(6116002)(5001770100001)(102836003)(1096002)(3846002)(86362001)(1220700001)(92566002)(9686002)(122556002)(2950100001)(2900100001)(54356999)(189998001)(77096005)(4326007)(50986999)(5008740100001)(76176999)(81166005)(33656002)(76576001)(106116001)(19580405001)(19580395003)(5003600100002)(10400500002)(5004730100002)(2201001)(66066001)(2501003)(11100500001)(87936001)(5002640100001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB1855;H:VI1PR0401MB1855.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2016 02:38:11.0345 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB1855 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Philippe Reynes Sent: Friday, April 15, 2016 6:35 AM > To: davem@davemloft.net; decot@googlers.com; f.fainelli@gmail.com; Fugang > Duan > Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Philippe Reynes > > Subject: [PATCH 3/3] fec: move to new ethtool api {get|set}_link_ksettings > > The ethtool api {get|set}_settings is deprecated. > We move the fec driver to new api {get|set}_link_ksettings. > > Signed-off-by: Philippe Reynes > --- > drivers/net/ethernet/freescale/fec_main.c | 16 ++++++++-------- > 1 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/ethernet/freescale/fec_main.c > b/drivers/net/ethernet/freescale/fec_main.c > index 08243c2..bfa10c3 100644 > --- a/drivers/net/ethernet/freescale/fec_main.c > +++ b/drivers/net/ethernet/freescale/fec_main.c > @@ -2058,8 +2058,8 @@ static void fec_enet_mii_remove(struct > fec_enet_private *fep) > } > } > > -static int fec_enet_get_settings(struct net_device *ndev, > - struct ethtool_cmd *cmd) > +static int fec_enet_get_link_ksettings(struct net_device *ndev, > + struct ethtool_link_ksettings *cmd) > { > struct fec_enet_private *fep = netdev_priv(ndev); > struct phy_device *phydev = fep->phy_dev; @@ -2067,11 +2067,11 > @@ static int fec_enet_get_settings(struct net_device *ndev, > if (!phydev) > return -ENODEV; > > - return phy_ethtool_gset(phydev, cmd); > + return phy_ethtool_ksettings_get(phydev, cmd); > } > > -static int fec_enet_set_settings(struct net_device *ndev, > - struct ethtool_cmd *cmd) > +static int fec_enet_set_link_ksettings(struct net_device *ndev, > + const struct ethtool_link_ksettings *cmd) > { > struct fec_enet_private *fep = netdev_priv(ndev); > struct phy_device *phydev = fep->phy_dev; @@ -2079,7 +2079,7 @@ > static int fec_enet_set_settings(struct net_device *ndev, > if (!phydev) > return -ENODEV; > > - return phy_ethtool_sset(phydev, cmd); > + return phy_ethtool_ksettings_set(phydev, cmd); > } > > static void fec_enet_get_drvinfo(struct net_device *ndev, @@ -2562,8 > +2562,6 @@ fec_enet_set_wol(struct net_device *ndev, struct > ethtool_wolinfo *wol) } > > static const struct ethtool_ops fec_enet_ethtool_ops = { > - .get_settings = fec_enet_get_settings, > - .set_settings = fec_enet_set_settings, > .get_drvinfo = fec_enet_get_drvinfo, > .get_regs_len = fec_enet_get_regs_len, > .get_regs = fec_enet_get_regs, > @@ -2583,6 +2581,8 @@ static const struct ethtool_ops fec_enet_ethtool_ops > = { > .set_tunable = fec_enet_set_tunable, > .get_wol = fec_enet_get_wol, > .set_wol = fec_enet_set_wol, > + .get_link_ksettings = fec_enet_get_link_ksettings, > + .set_link_ksettings = fec_enet_set_link_ksettings, > }; > > static int fec_enet_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) > -- > 1.7.4.4 Acked-by: Fugang Duan