diff options
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 64b201134fdb..249541a1814b 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -586,6 +586,10 @@ static void gfar_configure_serdes(struct net_device *dev) | |||
586 | struct gfar_mii __iomem *regs = | 586 | struct gfar_mii __iomem *regs = |
587 | (void __iomem *)&priv->regs->gfar_mii_regs; | 587 | (void __iomem *)&priv->regs->gfar_mii_regs; |
588 | int tbipa = gfar_read(&priv->regs->tbipa); | 588 | int tbipa = gfar_read(&priv->regs->tbipa); |
589 | struct mii_bus *bus = gfar_get_miibus(priv); | ||
590 | |||
591 | if (bus) | ||
592 | mutex_lock(&bus->mdio_lock); | ||
589 | 593 | ||
590 | /* Single clk mode, mii mode off(for serdes communication) */ | 594 | /* Single clk mode, mii mode off(for serdes communication) */ |
591 | gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT); | 595 | gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT); |
@@ -596,6 +600,9 @@ static void gfar_configure_serdes(struct net_device *dev) | |||
596 | 600 | ||
597 | gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE | | 601 | gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE | |
598 | BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000); | 602 | BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000); |
603 | |||
604 | if (bus) | ||
605 | mutex_unlock(&bus->mdio_lock); | ||
599 | } | 606 | } |
600 | 607 | ||
601 | static void init_registers(struct net_device *dev) | 608 | static void init_registers(struct net_device *dev) |