net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings
Subsystems (5)
PATCH 1/4 net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings
The ethtool api {get|set}_settings is deprecated.
We move the gianfar driver to new api {get|set}_link_ksettings.
--- drivers/net/ethernet/freescale/gianfar_ethtool.c | 25 +++++++--------------- 1 files changed, 8 insertions(+), 17 deletions(-)
drivers/net/ethernet/freescale/gianfar_ethtool.c +8 -17
@@ -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, };
Signature · 1 line
1.7.4.4
PATCH 2/4 net: ethernet: ucc: move to new ethtool api {get|set}_link_ksettings
The ethtool api {get|set}_settings is deprecated. We move the ucc driver to new api {get|set}_link_ksettings.
--- drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-)
drivers/net/ethernet/freescale/ucc_geth_ethtool.c +7 -10
@@ -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)
Signature · 1 line
1.7.4.4
Re: [PATCH 2/4] net: ethernet: ucc: move to new ethtool api {get|set}_link_ksettings
From: Philippe Reynes <[email protected]>
Date: Sun, 1 May 2016 17:08:09 +0200
Quoted 4 lines
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 <[email protected]>
Applied.
PATCH 3/4 net: ethernet: fs-enet: move to new ethtool api {get|set}_link_ksettings
In reply to Philippe ReynesThe ethtool api {get|set}_settings is deprecated.
We move the fs-enet driver to new api {get|set}_link_ksettings.
--- .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +10 -6
@@ -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)
Signature · 1 line
1.7.4.4
Re: [PATCH 3/4] net: ethernet: fs-enet: move to new ethtool api {get|set}_link_ksettings
From: Philippe Reynes <[email protected]>
Date: Sun, 1 May 2016 17:08:10 +0200
Quoted 4 lines
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 <[email protected]>
Applied.
PATCH 4/4 net: ethernet: fec_mpc52xx: move to new ethtool api {get|set}_link_ksettings
In reply to Philippe ReynesThe ethtool api {get|set}_settings is deprecated.
We move the fec_mpc52xx driver to new api {get|set}_link_ksettings.
--- drivers/net/ethernet/freescale/fec_mpc52xx.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
drivers/net/ethernet/freescale/fec_mpc52xx.c +10 -6
@@ -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, };
Signature · 1 line
1.7.4.4
Re: [PATCH 4/4] net: ethernet: fec_mpc52xx: move to new ethtool api {get|set}_link_ksettings
From: Philippe Reynes <[email protected]>
Date: Sun, 1 May 2016 17:08:11 +0200
Quoted 4 lines
The ethtool api {get|set}_settings is deprecated.
We move thefec_mpc52xxdriver to new api {get|set}_link_ksettings.Signed-off-by Philippe Reynes <[email protected]>
Applied.
From: Philippe Reynes <[email protected]>
Date: Sun, 1 May 2016 17:08:08 +0200
Quoted 4 lines
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 <[email protected]>
Applied.