diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-25 04:08:56 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-25 04:08:56 +0400 |
commit | 5f8fe4270e53d38421ba34c428c3b58933b48e50 (patch) | |
tree | 2148a3ba1ec842d0d0ad8f3e3eb209eb6eba673d /drivers/net/cris/eth_v10.c | |
parent | d9fbd9a2cd5ac1b286a7d7cdb1a180ce1edaee2f (diff) | |
parent | 24924ece4482d5466ffcd0affedce63816c88e53 (diff) | |
download | linux-5f8fe4270e53d38421ba34c428c3b58933b48e50.tar.xz |
Merge branch 'for-linus' of git://repo.or.cz/cris-mirror
* 'for-linus' of git://repo.or.cz/cris-mirror:
CRIS: Cleanup linker script using new linker script macros.
ARRAY_SIZE changes
CRIS: convert to asm-generic/hardirq.h
CRISv10: Don't autonegotiate if autonegotiation is off
CRIS: fix defconfig build failure
CRIS: add pgprot_noncached
Diffstat (limited to 'drivers/net/cris/eth_v10.c')
-rw-r--r-- | drivers/net/cris/eth_v10.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index 15c0195ebd31..a24be34a3f7a 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c @@ -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); } |