aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSteffen Klassert <klassert@mathematik.tu-chemnitz.de>2006-03-26 04:37:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:56:58 -0500
commite94d10eb0d77ae70378f9218631a7be91e0aecff (patch)
tree31f9bdce9927be2a8ebc54c9cf9b7acad5e0d262 /drivers
parentb4ff6450f5336c492d1e2f184d3b8186e0716b7a (diff)
[PATCH] 3c59x: carriercheck for forced media
Handle netif_carrier_{on,of} also if media is forced to 10baseT/100baseTx. Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/3c59x.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 3343cbda4197..4655662453ba 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -1907,8 +1907,6 @@ vortex_timer(unsigned long data)
1907 printk(KERN_DEBUG "dev->watchdog_timeo=%d\n", dev->watchdog_timeo); 1907 printk(KERN_DEBUG "dev->watchdog_timeo=%d\n", dev->watchdog_timeo);
1908 } 1908 }
1909 1909
1910 if (vp->medialock)
1911 goto leave_media_alone;
1912 disable_irq(dev->irq); 1910 disable_irq(dev->irq);
1913 old_window = ioread16(ioaddr + EL3_CMD) >> 13; 1911 old_window = ioread16(ioaddr + EL3_CMD) >> 13;
1914 EL3WINDOW(4); 1912 EL3WINDOW(4);
@@ -1947,6 +1945,9 @@ vortex_timer(unsigned long data)
1947 if (!netif_carrier_ok(dev)) 1945 if (!netif_carrier_ok(dev))
1948 next_tick = 5*HZ; 1946 next_tick = 5*HZ;
1949 1947
1948 if (vp->medialock)
1949 goto leave_media_alone;
1950
1950 if ( ! ok) { 1951 if ( ! ok) {
1951 unsigned int config; 1952 unsigned int config;
1952 1953
@@ -1980,14 +1981,14 @@ vortex_timer(unsigned long data)
1980 printk(KERN_DEBUG "wrote 0x%08x to Wn3_Config\n", config); 1981 printk(KERN_DEBUG "wrote 0x%08x to Wn3_Config\n", config);
1981 /* AKPM: FIXME: Should reset Rx & Tx here. P60 of 3c90xc.pdf */ 1982 /* AKPM: FIXME: Should reset Rx & Tx here. P60 of 3c90xc.pdf */
1982 } 1983 }
1983 EL3WINDOW(old_window);
1984 enable_irq(dev->irq);
1985 1984
1986leave_media_alone: 1985leave_media_alone:
1987 if (vortex_debug > 2) 1986 if (vortex_debug > 2)
1988 printk(KERN_DEBUG "%s: Media selection timer finished, %s.\n", 1987 printk(KERN_DEBUG "%s: Media selection timer finished, %s.\n",
1989 dev->name, media_tbl[dev->if_port].name); 1988 dev->name, media_tbl[dev->if_port].name);
1990 1989
1990 EL3WINDOW(old_window);
1991 enable_irq(dev->irq);
1991 mod_timer(&vp->timer, RUN_AT(next_tick)); 1992 mod_timer(&vp->timer, RUN_AT(next_tick));
1992 if (vp->deferred) 1993 if (vp->deferred)
1993 iowrite16(FakeIntr, ioaddr + EL3_CMD); 1994 iowrite16(FakeIntr, ioaddr + EL3_CMD);