diff options
author | Florian Fainelli <florian@openwrt.org> | 2010-05-16 12:36:26 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2010-05-16 12:36:26 +0000 |
commit | 3a6671b60cabc7001baf85cc876e1ec10361ea8b (patch) | |
tree | f7e402ff468cf012bd38ad8158df04c740c49c37 /target/linux/rdc/patches-2.6.32/013-r6040_fix_mii_check_media.patch | |
parent | ee531afd0192da015f9b27508a36ed2ad9dfed4d (diff) | |
download | master-187ad058-3a6671b60cabc7001baf85cc876e1ec10361ea8b.tar.gz master-187ad058-3a6671b60cabc7001baf85cc876e1ec10361ea8b.tar.bz2 master-187ad058-3a6671b60cabc7001baf85cc876e1ec10361ea8b.zip |
[rdc] fix link checking with switches, only port1 of switches would report link up
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21471 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/rdc/patches-2.6.32/013-r6040_fix_mii_check_media.patch')
-rw-r--r-- | target/linux/rdc/patches-2.6.32/013-r6040_fix_mii_check_media.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/rdc/patches-2.6.32/013-r6040_fix_mii_check_media.patch b/target/linux/rdc/patches-2.6.32/013-r6040_fix_mii_check_media.patch new file mode 100644 index 0000000000..41be86aa18 --- /dev/null +++ b/target/linux/rdc/patches-2.6.32/013-r6040_fix_mii_check_media.patch @@ -0,0 +1,33 @@ +diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c +index 4122916..eeee379 100644 +--- a/drivers/net/r6040.c ++++ b/drivers/net/r6040.c +@@ -400,9 +400,6 @@ static void r6040_init_mac_regs(struct net_device *dev) + * we may got called by r6040_tx_timeout which has left + * some unsent tx buffers */ + iowrite16(0x01, ioaddr + MTPR); +- +- /* Check media */ +- mii_check_media(&lp->mii_if, 1, 1); + } + + static void r6040_tx_timeout(struct net_device *dev) +@@ -530,8 +527,6 @@ static int r6040_phy_mode_chk(struct net_device *dev) + phy_dat = 0x0000; + } + +- mii_check_media(&lp->mii_if, 0, 1); +- + return phy_dat; + }; + +@@ -813,6 +808,9 @@ static void r6040_timer(unsigned long data) + + /* Timer active again */ + mod_timer(&lp->timer, round_jiffies(jiffies + HZ)); ++ ++ /* Check media */ ++ mii_check_media(&lp->mii_if, 1, 1); + } + + /* Read/set MAC address routines */ |