X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fgianfar.c;h=83a5cb6aa23b1fc5c4426a9863303be6bb10dad3;hb=bdb59f949d663b7e943fb5f40b2557af4314abf9;hp=249541a1814b6823e98b079b6b0ae061723aa3bf;hpb=c132419e560a2ecd3c8cf77f9c37e103e74b3754;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 249541a1814..83a5cb6aa23 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -591,6 +591,14 @@ static void gfar_configure_serdes(struct net_device *dev) if (bus) mutex_lock(&bus->mdio_lock); + /* If the link is already up, we must already be ok, and don't need to + * configure and reset the TBI<->SerDes link. Maybe U-Boot configured + * everything for us? Resetting it takes the link down and requires + * several seconds for it to come back. + */ + if (gfar_local_mdio_read(regs, tbipa, MII_BMSR) & BMSR_LSTATUS) + goto done; + /* Single clk mode, mii mode off(for serdes communication) */ gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT); @@ -601,6 +609,7 @@ static void gfar_configure_serdes(struct net_device *dev) gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000); + done: if (bus) mutex_unlock(&bus->mdio_lock); }