diff mbox series

[14/19] usbnet: smsc95xx: Replace mii_nway_restart()

Message ID 20190103011040.25974-15-marex@denx.de (mailing list archive)
State New, archived
Headers show
Series usbnet: smsc95xx: Convert to phydev | expand

Commit Message

Marek Vasut Jan. 3, 2019, 1:10 a.m. UTC
This is in fact genphy_restart_aneg(), just use the generic
phydev function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nisar Sayed <Nisar.Sayed@microchip.com>
Cc: Woojung Huh <Woojung.Huh@microchip.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-usb@vger.kernel.org
To: netdev@vger.kernel.org
---
 drivers/net/usb/smsc95xx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

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;