[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100415091134.GA9574@gromit.at.home>
Date: Thu, 15 Apr 2010 11:11:34 +0200
From: Martin Buck <mb-tmp-yvahk-argqri@...mit.dyndns.org>
To: Steffen Klassert <klassert@...hematik.tu-chemnitz.de>,
netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] Speedup link loss detection for 3c59x
From: Martin Buck <mb-tmp-yvahk-argqri@...mit.dyndns.org>
Change the timer used for link status checking to check link every 5s,
regardless of the current link state. This way, link loss is detected as
fast as new link, whereas this took up to 60s previously (which is pretty
inconvenient when trying to react on link loss using e.g. ifplugd). This
also matches behaviour of most other Ethernet drivers which typically have
link check intervals in the low second range.
Signed-off-by: Martin Buck <mb-tmp-yvahk-argqri@...mit.dyndns.org>
---
--- linux-2.6.31.6/drivers/net/3c59x.c.orig 2010-04-13 17:46:07.000000000 +0200
+++ linux-2.6.31.6/drivers/net/3c59x.c 2010-04-13 17:55:31.000000000 +0200
@@ -1761,7 +1761,7 @@ vortex_timer(unsigned long data)
struct net_device *dev = (struct net_device *)data;
struct vortex_private *vp = netdev_priv(dev);
void __iomem *ioaddr = vp->ioaddr;
- int next_tick = 60*HZ;
+ int next_tick = 5*HZ;
int ok = 0;
int media_status, old_window;
@@ -1807,9 +1807,6 @@ vortex_timer(unsigned long data)
ok = 1;
}
- if (!netif_carrier_ok(dev))
- next_tick = 5*HZ;
-
if (vp->medialock)
goto leave_media_alone;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists