Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166162
b: refs/heads/master
c: e6cd197
h: refs/heads/master
v: v3
  • Loading branch information
Jesper Nilsson committed Aug 31, 2009
1 parent 3638ddb commit fa1f527
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a090ca2c840a3459642971f26bdbad96d2482e32
refs/heads/master: e6cd19743bfc76ca81804c2a259e3a0d7b03fd73
20 changes: 17 additions & 3 deletions trunk/drivers/net/cris/eth_v10.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,10 +768,24 @@ e100_negotiate(struct net_device* dev)

e100_set_mdio_reg(dev, np->mii_if.phy_id, MII_ADVERTISE, data);

/* Renegotiate with link partner */
data = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_BMCR);
if (autoneg_normal) {
data = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_BMCR);
data |= BMCR_ANENABLE | BMCR_ANRESTART;
/* Renegotiate with link partner */
data |= BMCR_ANENABLE | BMCR_ANRESTART;
} else {
/* Don't negotiate speed or duplex */
data &= ~(BMCR_ANENABLE | BMCR_ANRESTART);

/* Set speed and duplex static */
if (current_speed_selection == 10)
data &= ~BMCR_SPEED100;
else
data |= BMCR_SPEED100;

if (current_duplex != full)
data &= ~BMCR_FULLDPLX;
else
data |= BMCR_FULLDPLX;
}
e100_set_mdio_reg(dev, np->mii_if.phy_id, MII_BMCR, data);
}
Expand Down

0 comments on commit fa1f527

Please sign in to comment.