mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 00:06:14 +07:00
net: mv643xx_eth: Simplify mv643xx_eth_adjust_link()
Currently, mv643xx_eth_adjust_link() is only used to call mv643xx_adjust_pscr(). This commit renames the latter to the former, and therefore removes the extra and useless function. Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ece80490e2
commit
0a9e413b44
@ -1167,8 +1167,9 @@ static void txq_set_fixed_prio_mode(struct tx_queue *txq)
|
|||||||
|
|
||||||
|
|
||||||
/* mii management interface *************************************************/
|
/* mii management interface *************************************************/
|
||||||
static void mv643xx_adjust_pscr(struct mv643xx_eth_private *mp)
|
static void mv643xx_eth_adjust_link(struct net_device *dev)
|
||||||
{
|
{
|
||||||
|
struct mv643xx_eth_private *mp = netdev_priv(dev);
|
||||||
u32 pscr = rdlp(mp, PORT_SERIAL_CONTROL);
|
u32 pscr = rdlp(mp, PORT_SERIAL_CONTROL);
|
||||||
u32 autoneg_disable = FORCE_LINK_PASS |
|
u32 autoneg_disable = FORCE_LINK_PASS |
|
||||||
DISABLE_AUTO_NEG_SPEED_GMII |
|
DISABLE_AUTO_NEG_SPEED_GMII |
|
||||||
@ -1544,7 +1545,7 @@ mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
|
|||||||
|
|
||||||
ret = phy_ethtool_sset(mp->phy, cmd);
|
ret = phy_ethtool_sset(mp->phy, cmd);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
mv643xx_adjust_pscr(mp);
|
mv643xx_eth_adjust_link(dev);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2473,7 +2474,7 @@ static int mv643xx_eth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|||||||
|
|
||||||
ret = phy_mii_ioctl(mp->phy, ifr, cmd);
|
ret = phy_mii_ioctl(mp->phy, ifr, cmd);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
mv643xx_adjust_pscr(mp);
|
mv643xx_eth_adjust_link(dev);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2871,13 +2872,6 @@ static void set_params(struct mv643xx_eth_private *mp,
|
|||||||
mp->txq_count = pd->tx_queue_count ? : 1;
|
mp->txq_count = pd->tx_queue_count ? : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mv643xx_eth_adjust_link(struct net_device *dev)
|
|
||||||
{
|
|
||||||
struct mv643xx_eth_private *mp = netdev_priv(dev);
|
|
||||||
|
|
||||||
mv643xx_adjust_pscr(mp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct phy_device *phy_scan(struct mv643xx_eth_private *mp,
|
static struct phy_device *phy_scan(struct mv643xx_eth_private *mp,
|
||||||
int phy_addr)
|
int phy_addr)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user