summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 17:08:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 17:08:56 -0700
commit5f8fe4270e53d38421ba34c428c3b58933b48e50 (patch)
tree2148a3ba1ec842d0d0ad8f3e3eb209eb6eba673d /drivers
parentd9fbd9a2cd5ac1b286a7d7cdb1a180ce1edaee2f (diff)
parent24924ece4482d5466ffcd0affedce63816c88e53 (diff)
downloadlinux-3.10-5f8fe4270e53d38421ba34c428c3b58933b48e50.tar.gz
linux-3.10-5f8fe4270e53d38421ba34c428c3b58933b48e50.tar.bz2
linux-3.10-5f8fe4270e53d38421ba34c428c3b58933b48e50.zip
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')
-rw-r--r--drivers/net/cris/eth_v10.c20
-rw-r--r--drivers/serial/crisv10.c1
2 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index 15c0195ebd3..a24be34a3f7 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);
}
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c
index 7be52fe288e..31f172397af 100644
--- a/drivers/serial/crisv10.c
+++ b/drivers/serial/crisv10.c
@@ -18,6 +18,7 @@ static char *serial_version = "$Revision: 1.25 $";
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
+#include <linux/smp_lock.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/mm.h>