linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings
@ 2016-05-01 15:08 Philippe Reynes
  2016-05-01 15:08 ` [PATCH 2/4] net: ethernet: ucc: " Philippe Reynes
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Philippe Reynes @ 2016-05-01 15:08 UTC (permalink / raw)
  To: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding, davem
  Cc: netdev, linux-kernel, linuxppc-dev, Philippe Reynes

The ethtool api {get|set}_settings is deprecated.
We move the gianfar driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 drivers/net/ethernet/freescale/gianfar_ethtool.c |   25 +++++++---------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 4b0ee85..2c45c80 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -185,7 +185,8 @@ static void gfar_gdrvinfo(struct net_device *dev,
 }
 
 
-static int gfar_ssettings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int gfar_set_ksettings(struct net_device *dev,
+			      const struct ethtool_link_ksettings *cmd)
 {
 	struct gfar_private *priv = netdev_priv(dev);
 	struct phy_device *phydev = priv->phydev;
@@ -193,29 +194,19 @@ static int gfar_ssettings(struct net_device *dev, struct ethtool_cmd *cmd)
 	if (NULL == phydev)
 		return -ENODEV;
 
-	return phy_ethtool_sset(phydev, cmd);
+	return phy_ethtool_ksettings_set(phydev, cmd);
 }
 
-
-/* Return the current settings in the ethtool_cmd structure */
-static int gfar_gsettings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int gfar_get_ksettings(struct net_device *dev,
+			      struct ethtool_link_ksettings *cmd)
 {
 	struct gfar_private *priv = netdev_priv(dev);
 	struct phy_device *phydev = priv->phydev;
-	struct gfar_priv_rx_q *rx_queue = NULL;
-	struct gfar_priv_tx_q *tx_queue = NULL;
 
 	if (NULL == phydev)
 		return -ENODEV;
-	tx_queue = priv->tx_queue[0];
-	rx_queue = priv->rx_queue[0];
-
-	/* etsec-1.7 and older versions have only one txic
-	 * and rxic regs although they support multiple queues */
-	cmd->maxtxpkt = get_icft_value(tx_queue->txic);
-	cmd->maxrxpkt = get_icft_value(rx_queue->rxic);
 
-	return phy_ethtool_gset(phydev, cmd);
+	return phy_ethtool_ksettings_get(phydev, cmd);
 }
 
 /* Return the length of the register structure */
@@ -1565,8 +1556,6 @@ static int gfar_get_ts_info(struct net_device *dev,
 }
 
 const struct ethtool_ops gfar_ethtool_ops = {
-	.get_settings = gfar_gsettings,
-	.set_settings = gfar_ssettings,
 	.get_drvinfo = gfar_gdrvinfo,
 	.get_regs_len = gfar_reglen,
 	.get_regs = gfar_get_regs,
@@ -1589,4 +1578,6 @@ const struct ethtool_ops gfar_ethtool_ops = {
 	.set_rxnfc = gfar_set_nfc,
 	.get_rxnfc = gfar_get_nfc,
 	.get_ts_info = gfar_get_ts_info,
+	.get_link_ksettings = gfar_get_ksettings,
+	.set_link_ksettings = gfar_set_ksettings,
 };
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] net: ethernet: ucc: move to new ethtool api {get|set}_link_ksettings
  2016-05-01 15:08 [PATCH 1/4] net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings Philippe Reynes
@ 2016-05-01 15:08 ` Philippe Reynes
  2016-05-03 17:04   ` David Miller
  2016-05-01 15:08 ` [PATCH 3/4] net: ethernet: fs-enet: " Philippe Reynes
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Philippe Reynes @ 2016-05-01 15:08 UTC (permalink / raw)
  To: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding, davem
  Cc: netdev, linux-kernel, linuxppc-dev, Philippe Reynes

The ethtool api {get|set}_settings is deprecated.
We move the ucc driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 drivers/net/ethernet/freescale/ucc_geth_ethtool.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/freescale/ucc_geth_ethtool.c b/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
index 89714f5..812a968 100644
--- a/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
+++ b/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
@@ -105,23 +105,20 @@ static const char rx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
 #define UEC_RX_FW_STATS_LEN ARRAY_SIZE(rx_fw_stat_gstrings)
 
 static int
-uec_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+uec_get_ksettings(struct net_device *netdev, struct ethtool_link_ksettings *cmd)
 {
 	struct ucc_geth_private *ugeth = netdev_priv(netdev);
 	struct phy_device *phydev = ugeth->phydev;
-	struct ucc_geth_info *ug_info = ugeth->ug_info;
 
 	if (!phydev)
 		return -ENODEV;
 
-	ecmd->maxtxpkt = 1;
-	ecmd->maxrxpkt = ug_info->interruptcoalescingmaxvalue[0];
-
-	return phy_ethtool_gset(phydev, ecmd);
+	return phy_ethtool_ksettings_get(phydev, cmd);
 }
 
 static int
-uec_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+uec_set_ksettings(struct net_device *netdev,
+		  const struct ethtool_link_ksettings *cmd)
 {
 	struct ucc_geth_private *ugeth = netdev_priv(netdev);
 	struct phy_device *phydev = ugeth->phydev;
@@ -129,7 +126,7 @@ uec_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
 	if (!phydev)
 		return -ENODEV;
 
-	return phy_ethtool_sset(phydev, ecmd);
+	return phy_ethtool_ksettings_set(phydev, cmd);
 }
 
 static void
@@ -392,8 +389,6 @@ static int uec_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 #endif /* CONFIG_PM */
 
 static const struct ethtool_ops uec_ethtool_ops = {
-	.get_settings           = uec_get_settings,
-	.set_settings           = uec_set_settings,
 	.get_drvinfo            = uec_get_drvinfo,
 	.get_regs_len           = uec_get_regs_len,
 	.get_regs               = uec_get_regs,
@@ -411,6 +406,8 @@ static const struct ethtool_ops uec_ethtool_ops = {
 	.get_wol		= uec_get_wol,
 	.set_wol		= uec_set_wol,
 	.get_ts_info		= ethtool_op_get_ts_info,
+	.get_link_ksettings	= uec_get_ksettings,
+	.set_link_ksettings	= uec_set_ksettings,
 };
 
 void uec_set_ethtool_ops(struct net_device *netdev)
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] net: ethernet: fs-enet: move to new ethtool api {get|set}_link_ksettings
  2016-05-01 15:08 [PATCH 1/4] net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings Philippe Reynes
  2016-05-01 15:08 ` [PATCH 2/4] net: ethernet: ucc: " Philippe Reynes
@ 2016-05-01 15:08 ` Philippe Reynes
  2016-05-03 17:04   ` David Miller
  2016-05-01 15:08 ` [PATCH 4/4] net: ethernet: fec_mpc52xx: " Philippe Reynes
  2016-05-03 17:04 ` [PATCH 1/4] net: ethernet: gianfar: " David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: Philippe Reynes @ 2016-05-01 15:08 UTC (permalink / raw)
  To: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding, davem
  Cc: netdev, linux-kernel, linuxppc-dev, Philippe Reynes

The ethtool api {get|set}_settings is deprecated.
We move the fs-enet driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 .../net/ethernet/freescale/fs_enet/fs_enet-main.c  |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
index 48a9c17..da90b5a 100644
--- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
+++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
@@ -847,24 +847,28 @@ static void fs_get_regs(struct net_device *dev, struct ethtool_regs *regs,
 		regs->version = 0;
 }
 
-static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int fs_get_ksettings(struct net_device *dev,
+			    struct ethtool_link_ksettings *cmd)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
+	struct phy_device *phydev = fep->phydev;
 
 	if (!fep->phydev)
 		return -ENODEV;
 
-	return phy_ethtool_gset(fep->phydev, cmd);
+	return phy_ethtool_ksettings_get(phydev, cmd);
 }
 
-static int fs_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int fs_set_ksettings(struct net_device *dev,
+			    const struct ethtool_link_ksettings *cmd)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
+	struct phy_device *phydev = fep->phydev;
 
 	if (!fep->phydev)
 		return -ENODEV;
 
-	return phy_ethtool_sset(fep->phydev, cmd);
+	return phy_ethtool_ksettings_set(phydev, cmd);
 }
 
 static int fs_nway_reset(struct net_device *dev)
@@ -887,14 +891,14 @@ static void fs_set_msglevel(struct net_device *dev, u32 value)
 static const struct ethtool_ops fs_ethtool_ops = {
 	.get_drvinfo = fs_get_drvinfo,
 	.get_regs_len = fs_get_regs_len,
-	.get_settings = fs_get_settings,
-	.set_settings = fs_set_settings,
 	.nway_reset = fs_nway_reset,
 	.get_link = ethtool_op_get_link,
 	.get_msglevel = fs_get_msglevel,
 	.set_msglevel = fs_set_msglevel,
 	.get_regs = fs_get_regs,
 	.get_ts_info = ethtool_op_get_ts_info,
+	.get_link_ksettings = fs_get_ksettings,
+	.set_link_ksettings = fs_set_ksettings,
 };
 
 static int fs_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] net: ethernet: fec_mpc52xx: move to new ethtool api {get|set}_link_ksettings
  2016-05-01 15:08 [PATCH 1/4] net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings Philippe Reynes
  2016-05-01 15:08 ` [PATCH 2/4] net: ethernet: ucc: " Philippe Reynes
  2016-05-01 15:08 ` [PATCH 3/4] net: ethernet: fs-enet: " Philippe Reynes
@ 2016-05-01 15:08 ` Philippe Reynes
  2016-05-03 17:04   ` David Miller
  2016-05-03 17:04 ` [PATCH 1/4] net: ethernet: gianfar: " David Miller
  3 siblings, 1 reply; 8+ messages in thread
From: Philippe Reynes @ 2016-05-01 15:08 UTC (permalink / raw)
  To: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding, davem
  Cc: netdev, linux-kernel, linuxppc-dev, Philippe Reynes

The ethtool api {get|set}_settings is deprecated.
We move the fec_mpc52xx driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 drivers/net/ethernet/freescale/fec_mpc52xx.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx.c b/drivers/net/ethernet/freescale/fec_mpc52xx.c
index 25553ee..f444714 100644
--- a/drivers/net/ethernet/freescale/fec_mpc52xx.c
+++ b/drivers/net/ethernet/freescale/fec_mpc52xx.c
@@ -763,24 +763,28 @@ static void mpc52xx_fec_reset(struct net_device *dev)
 
 /* ethtool interface */
 
-static int mpc52xx_fec_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int mpc52xx_fec_get_ksettings(struct net_device *dev,
+				     struct ethtool_link_ksettings *cmd)
 {
 	struct mpc52xx_fec_priv *priv = netdev_priv(dev);
+	struct phy_device *phydev = priv->phydev;
 
 	if (!priv->phydev)
 		return -ENODEV;
 
-	return phy_ethtool_gset(priv->phydev, cmd);
+	return phy_ethtool_ksettings_get(phydev, cmd);
 }
 
-static int mpc52xx_fec_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int mpc52xx_fec_set_ksettings(struct net_device *dev,
+				     const struct ethtool_link_ksettings *cmd)
 {
 	struct mpc52xx_fec_priv *priv = netdev_priv(dev);
+	struct phy_device *phydev = priv->phydev;
 
 	if (!priv->phydev)
 		return -ENODEV;
 
-	return phy_ethtool_sset(priv->phydev, cmd);
+	return phy_ethtool_ksettings_set(phydev, cmd);
 }
 
 static u32 mpc52xx_fec_get_msglevel(struct net_device *dev)
@@ -796,12 +800,12 @@ static void mpc52xx_fec_set_msglevel(struct net_device *dev, u32 level)
 }
 
 static const struct ethtool_ops mpc52xx_fec_ethtool_ops = {
-	.get_settings = mpc52xx_fec_get_settings,
-	.set_settings = mpc52xx_fec_set_settings,
 	.get_link = ethtool_op_get_link,
 	.get_msglevel = mpc52xx_fec_get_msglevel,
 	.set_msglevel = mpc52xx_fec_set_msglevel,
 	.get_ts_info = ethtool_op_get_ts_info,
+	.get_link_ksettings = mpc52xx_fec_get_ksettings,
+	.set_link_ksettings = mpc52xx_fec_set_ksettings,
 };
 
 
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/4] net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings
  2016-05-01 15:08 [PATCH 1/4] net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings Philippe Reynes
                   ` (2 preceding siblings ...)
  2016-05-01 15:08 ` [PATCH 4/4] net: ethernet: fec_mpc52xx: " Philippe Reynes
@ 2016-05-03 17:04 ` David Miller
  3 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2016-05-03 17:04 UTC (permalink / raw)
  To: tremyfr
  Cc: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding,
	netdev, linux-kernel, linuxppc-dev

From: Philippe Reynes <tremyfr@gmail.com>
Date: Sun,  1 May 2016 17:08:08 +0200

> The ethtool api {get|set}_settings is deprecated.
> We move the gianfar driver to new api {get|set}_link_ksettings.
> 
> Signed-off-by: Philippe Reynes <tremyfr@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] net: ethernet: ucc: move to new ethtool api {get|set}_link_ksettings
  2016-05-01 15:08 ` [PATCH 2/4] net: ethernet: ucc: " Philippe Reynes
@ 2016-05-03 17:04   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2016-05-03 17:04 UTC (permalink / raw)
  To: tremyfr
  Cc: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding,
	netdev, linux-kernel, linuxppc-dev

From: Philippe Reynes <tremyfr@gmail.com>
Date: Sun,  1 May 2016 17:08:09 +0200

> The ethtool api {get|set}_settings is deprecated.
> We move the ucc driver to new api {get|set}_link_ksettings.
> 
> Signed-off-by: Philippe Reynes <tremyfr@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/4] net: ethernet: fs-enet: move to new ethtool api {get|set}_link_ksettings
  2016-05-01 15:08 ` [PATCH 3/4] net: ethernet: fs-enet: " Philippe Reynes
@ 2016-05-03 17:04   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2016-05-03 17:04 UTC (permalink / raw)
  To: tremyfr
  Cc: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding,
	netdev, linux-kernel, linuxppc-dev

From: Philippe Reynes <tremyfr@gmail.com>
Date: Sun,  1 May 2016 17:08:10 +0200

> The ethtool api {get|set}_settings is deprecated.
> We move the fs-enet driver to new api {get|set}_link_ksettings.
> 
> Signed-off-by: Philippe Reynes <tremyfr@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 4/4] net: ethernet: fec_mpc52xx: move to new ethtool api {get|set}_link_ksettings
  2016-05-01 15:08 ` [PATCH 4/4] net: ethernet: fec_mpc52xx: " Philippe Reynes
@ 2016-05-03 17:04   ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2016-05-03 17:04 UTC (permalink / raw)
  To: tremyfr
  Cc: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding,
	netdev, linux-kernel, linuxppc-dev

From: Philippe Reynes <tremyfr@gmail.com>
Date: Sun,  1 May 2016 17:08:11 +0200

> The ethtool api {get|set}_settings is deprecated.
> We move the fec_mpc52xx driver to new api {get|set}_link_ksettings.
> 
> Signed-off-by: Philippe Reynes <tremyfr@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-03 17:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-01 15:08 [PATCH 1/4] net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings Philippe Reynes
2016-05-01 15:08 ` [PATCH 2/4] net: ethernet: ucc: " Philippe Reynes
2016-05-03 17:04   ` David Miller
2016-05-01 15:08 ` [PATCH 3/4] net: ethernet: fs-enet: " Philippe Reynes
2016-05-03 17:04   ` David Miller
2016-05-01 15:08 ` [PATCH 4/4] net: ethernet: fec_mpc52xx: " Philippe Reynes
2016-05-03 17:04   ` David Miller
2016-05-03 17:04 ` [PATCH 1/4] net: ethernet: gianfar: " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).