From: Florian Fainelli Date: Tue, 15 Nov 2016 18:06:32 +0000 (-0800) Subject: net: bcm63xx_enet: Utilize phy_ethtool_nway_reset X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=42469bf5d9bb9fe5e2ab28f18a5d39776797f026;p=linux-beck.git net: bcm63xx_enet: Utilize phy_ethtool_nway_reset Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index 5c7acef1de2e..a43ab90c051e 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -1434,11 +1434,8 @@ static int bcm_enet_nway_reset(struct net_device *dev) struct bcm_enet_priv *priv; priv = netdev_priv(dev); - if (priv->has_phy) { - if (!dev->phydev) - return -ENODEV; - return genphy_restart_aneg(dev->phydev); - } + if (priv->has_phy) + return phy_ethtool_nway_reset(dev), return -EOPNOTSUPP; }