This is in fact genphy_restart_aneg(), just use the generic
phydev function.

Signed-off-by: Marek Vasut <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Nisar Sayed <[email protected]>
Cc: Woojung Huh <[email protected]>
Cc: Andrew Lunn <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: [email protected]
To: [email protected]
---
 drivers/net/usb/smsc95xx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 401662f28f01..87830c67aee1 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -990,7 +990,10 @@ static int smsc95xx_phy_initialize(struct usbnet *dev)
 
        phy_write(pdata->phydev, PHY_INT_MASK,
                PHY_INT_MASK_DEFAULT_);
-       mii_nway_restart(&dev->mii);
+
+       ret = genphy_restart_aneg(pdata->phydev);
+       if (ret)
+               return ret;
 
        netif_dbg(dev, ifup, dev->net, "phy initialised successfully\n");
        return 0;
-- 
2.19.2

Reply via email to