diff mbox series

[16/19] usbnet: smsc95xx: Replace mii_check_media()

Message ID 20190103011040.25974-17-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
The mii_check_media() is called to read out the PHY status registers
and update the internal status reported by mii_ethtool_gset(), just
replace it with phydev compatible phy_read_status().

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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index b04df07d882e..14a83358cb35 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -540,7 +540,6 @@  static int smsc95xx_phy_update_flowcontrol(struct usbnet *dev, u8 duplex,
 static int smsc95xx_link_reset(struct usbnet *dev)
 {
 	struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
-	struct mii_if_info *mii = &dev->mii;
 	struct ethtool_link_ksettings ecmd;
 	unsigned long flags;
 	u16 lcladv, rmtadv;
@@ -555,7 +554,7 @@  static int smsc95xx_link_reset(struct usbnet *dev)
 	if (ret < 0)
 		return ret;
 
-	mii_check_media(mii, 1, 1);
+	phy_read_status(pdata->phydev);
 	phy_ethtool_ksettings_get(pdata->phydev, &ecmd);
 	lcladv = phy_read(pdata->phydev, MII_ADVERTISE);
 	rmtadv = phy_read(pdata->phydev, MII_LPA);