Commit 5c721d56 authored by David S. Miller's avatar David S. Miller

Merge branch 'mdio-device-fixes'

Andrew Lunn says:

====================
Fix breakage from mdio device

These two patches fix MIPS platforms which got broken by
the recent mdio device patchset.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 6c672c9b 0c129bf7
...@@ -375,15 +375,9 @@ static int ...@@ -375,15 +375,9 @@ static int
ltq_etop_mdio_probe(struct net_device *dev) ltq_etop_mdio_probe(struct net_device *dev)
{ {
struct ltq_etop_priv *priv = netdev_priv(dev); struct ltq_etop_priv *priv = netdev_priv(dev);
struct phy_device *phydev = NULL; struct phy_device *phydev;
int phy_addr;
for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) { phydev = phy_find_first(priv->mii_bus);
if (priv->mii_bus->phy_map[phy_addr]) {
phydev = priv->mii_bus->phy_map[phy_addr];
break;
}
}
if (!phydev) { if (!phydev) {
netdev_err(dev, "no PHY found\n"); netdev_err(dev, "no PHY found\n");
......
...@@ -78,7 +78,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev) ...@@ -78,7 +78,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
*/ */
spin_lock_irqsave(&global_register_lock, flags); spin_lock_irqsave(&global_register_lock, flags);
} else { } else {
mutex_lock(&priv->phydev->bus->mdio_lock); mutex_lock(&priv->phydev->mdio.bus->mdio_lock);
} }
link_info = cvmx_helper_link_get(priv->port); link_info = cvmx_helper_link_get(priv->port);
...@@ -113,7 +113,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev) ...@@ -113,7 +113,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
if (use_global_register_lock) if (use_global_register_lock)
spin_unlock_irqrestore(&global_register_lock, flags); spin_unlock_irqrestore(&global_register_lock, flags);
else else
mutex_unlock(&priv->phydev->bus->mdio_lock); mutex_unlock(&priv->phydev->mdio.bus->mdio_lock);
return; return;
} }
...@@ -132,7 +132,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev) ...@@ -132,7 +132,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
if (use_global_register_lock) if (use_global_register_lock)
spin_unlock_irqrestore(&global_register_lock, flags); spin_unlock_irqrestore(&global_register_lock, flags);
else else
mutex_unlock(&priv->phydev->bus->mdio_lock); mutex_unlock(&priv->phydev->mdio.bus->mdio_lock);
if (priv->phydev == NULL) { if (priv->phydev == NULL) {
/* Tell core. */ /* Tell core. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment