Commit 62c8d3da authored by Philippe Reynes's avatar Philippe Reynes Committed by David S. Miller

Revert "net: ethernet: bcmgenet: use new api ethtool_{get|set}_link_ksettings"

This reverts commit 6b352ebc ("net: ethernet: broadcom: bcmgenet:
use new api ethtool_{get|set}_link_ksettings").

We needs to revert the commit 62469c76 ("net: ethernet: bcmgenet:
use phydev from struct net_device"), because this commit add a
regression. As the commit 6b352ebc ("net: ethernet: broadcom:
bcmgenet: use new api ethtool_{get|set}_link_ksettings") depend
on the first one, we also need to revert it first.
Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1955351d
...@@ -450,8 +450,8 @@ static inline void bcmgenet_rdma_ring_writel(struct bcmgenet_priv *priv, ...@@ -450,8 +450,8 @@ static inline void bcmgenet_rdma_ring_writel(struct bcmgenet_priv *priv,
genet_dma_ring_regs[r]); genet_dma_ring_regs[r]);
} }
static int bcmgenet_get_link_ksettings(struct net_device *dev, static int bcmgenet_get_settings(struct net_device *dev,
struct ethtool_link_ksettings *cmd) struct ethtool_cmd *cmd)
{ {
if (!netif_running(dev)) if (!netif_running(dev))
return -EINVAL; return -EINVAL;
...@@ -459,11 +459,11 @@ static int bcmgenet_get_link_ksettings(struct net_device *dev, ...@@ -459,11 +459,11 @@ static int bcmgenet_get_link_ksettings(struct net_device *dev,
if (!dev->phydev) if (!dev->phydev)
return -ENODEV; return -ENODEV;
return phy_ethtool_ksettings_get(dev->phydev, cmd); return phy_ethtool_gset(dev->phydev, cmd);
} }
static int bcmgenet_set_link_ksettings(struct net_device *dev, static int bcmgenet_set_settings(struct net_device *dev,
const struct ethtool_link_ksettings *cmd) struct ethtool_cmd *cmd)
{ {
if (!netif_running(dev)) if (!netif_running(dev))
return -EINVAL; return -EINVAL;
...@@ -471,7 +471,7 @@ static int bcmgenet_set_link_ksettings(struct net_device *dev, ...@@ -471,7 +471,7 @@ static int bcmgenet_set_link_ksettings(struct net_device *dev,
if (!dev->phydev) if (!dev->phydev)
return -ENODEV; return -ENODEV;
return phy_ethtool_ksettings_set(dev->phydev, cmd); return phy_ethtool_sset(dev->phydev, cmd);
} }
static int bcmgenet_set_rx_csum(struct net_device *dev, static int bcmgenet_set_rx_csum(struct net_device *dev,
...@@ -977,6 +977,8 @@ static const struct ethtool_ops bcmgenet_ethtool_ops = { ...@@ -977,6 +977,8 @@ static const struct ethtool_ops bcmgenet_ethtool_ops = {
.get_strings = bcmgenet_get_strings, .get_strings = bcmgenet_get_strings,
.get_sset_count = bcmgenet_get_sset_count, .get_sset_count = bcmgenet_get_sset_count,
.get_ethtool_stats = bcmgenet_get_ethtool_stats, .get_ethtool_stats = bcmgenet_get_ethtool_stats,
.get_settings = bcmgenet_get_settings,
.set_settings = bcmgenet_set_settings,
.get_drvinfo = bcmgenet_get_drvinfo, .get_drvinfo = bcmgenet_get_drvinfo,
.get_link = ethtool_op_get_link, .get_link = ethtool_op_get_link,
.get_msglevel = bcmgenet_get_msglevel, .get_msglevel = bcmgenet_get_msglevel,
...@@ -988,8 +990,6 @@ static const struct ethtool_ops bcmgenet_ethtool_ops = { ...@@ -988,8 +990,6 @@ static const struct ethtool_ops bcmgenet_ethtool_ops = {
.nway_reset = bcmgenet_nway_reset, .nway_reset = bcmgenet_nway_reset,
.get_coalesce = bcmgenet_get_coalesce, .get_coalesce = bcmgenet_get_coalesce,
.set_coalesce = bcmgenet_set_coalesce, .set_coalesce = bcmgenet_set_coalesce,
.get_link_ksettings = bcmgenet_get_link_ksettings,
.set_link_ksettings = bcmgenet_set_link_ksettings,
}; };
/* Power down the unimac, based on mode. */ /* Power down the unimac, based on mode. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment