Skip to content

Commit

Permalink
Merge branch 'mdio-device-fixes'
Browse files Browse the repository at this point in the history
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: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Jan 10, 2016
2 parents 6c672c9 + 0c129bf commit 5c721d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 2 additions & 8 deletions drivers/net/ethernet/lantiq_etop.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,9 @@ static int
ltq_etop_mdio_probe(struct net_device *dev)
{
struct ltq_etop_priv *priv = netdev_priv(dev);
struct phy_device *phydev = NULL;
int phy_addr;
struct phy_device *phydev;

for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) {
if (priv->mii_bus->phy_map[phy_addr]) {
phydev = priv->mii_bus->phy_map[phy_addr];
break;
}
}
phydev = phy_find_first(priv->mii_bus);

if (!phydev) {
netdev_err(dev, "no PHY found\n");
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/octeon/ethernet-rgmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
*/
spin_lock_irqsave(&global_register_lock, flags);
} else {
mutex_lock(&priv->phydev->bus->mdio_lock);
mutex_lock(&priv->phydev->mdio.bus->mdio_lock);
}

link_info = cvmx_helper_link_get(priv->port);
Expand Down Expand Up @@ -113,7 +113,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
if (use_global_register_lock)
spin_unlock_irqrestore(&global_register_lock, flags);
else
mutex_unlock(&priv->phydev->bus->mdio_lock);
mutex_unlock(&priv->phydev->mdio.bus->mdio_lock);
return;
}

Expand All @@ -132,7 +132,7 @@ static void cvm_oct_rgmii_poll(struct net_device *dev)
if (use_global_register_lock)
spin_unlock_irqrestore(&global_register_lock, flags);
else
mutex_unlock(&priv->phydev->bus->mdio_lock);
mutex_unlock(&priv->phydev->mdio.bus->mdio_lock);

if (priv->phydev == NULL) {
/* Tell core. */
Expand Down

0 comments on commit 5c721d5

Please sign in to comment.