From: Eric Dumazet Date: Tue, 14 Feb 2012 10:27:09 +0000 (+0000) Subject: 3c59x: shorten timer period for slave devices X-Git-Tag: upstream/snapshot3+hdmi~8130^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3013dc0cceb9baaf25d5624034eeaa259bf99004;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 3c59x: shorten timer period for slave devices Jean Delvare reported bonding on top of 3c59x adapters was not detecting network cable removal fast enough. 3c59x indeed uses a 60 seconds timer to check link status if carrier is on, and 5 seconds if carrier is off. This patch reduces timer period to 5 seconds if device is a bonding slave. Reported-by: Jean Delvare Acked-by: Jean Delvare Acked-by: Steffen Klassert Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c index 8153a3e..f9b74c0 100644 --- a/drivers/net/ethernet/3com/3c59x.c +++ b/drivers/net/ethernet/3com/3c59x.c @@ -1842,7 +1842,7 @@ vortex_timer(unsigned long data) ok = 1; } - if (!netif_carrier_ok(dev)) + if (dev->flags & IFF_SLAVE || !netif_carrier_ok(dev)) next_tick = 5*HZ; if (vp->medialock)