]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
3c59x: shorten timer period for slave devices
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 14 Feb 2012 10:27:09 +0000 (10:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Feb 2012 21:28:23 +0000 (16:28 -0500)
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 <jdelvare@suse.de>
Acked-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/3com/3c59x.c

index 8153a3e0a1a4457a5c156508d7c605362bc76e37..f9b74c0a84926eb0cfb93dea482719a4be797202 100644 (file)
@@ -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)