Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118333
b: refs/heads/master
c: bdb59f9
h: refs/heads/master
i:
  118331: 49fa7ae
v: v3
  • Loading branch information
Trent Piepho authored and Jeff Garzik committed Oct 31, 2008
1 parent 9c9b6fd commit 6315e70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c132419e560a2ecd3c8cf77f9c37e103e74b3754
refs/heads/master: bdb59f949d663b7e943fb5f40b2557af4314abf9
9 changes: 9 additions & 0 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}
Expand Down

0 comments on commit 6315e70

Please sign in to comment.