]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] bonding: ARP monitoring broken on x86_64
authorAndy Gospodarek <andy@greyhouse.net>
Mon, 29 Jan 2007 20:08:38 +0000 (12:08 -0800)
committerChris Wright <chrisw@sous-sol.org>
Mon, 5 Feb 2007 16:31:44 +0000 (08:31 -0800)
While working with the latest bonding code I noticed a nasty problem that
will prevent arp monitoring from always functioning correctly on x86_64
systems.  Comparing ints to longs and expecting reliable results on x86_64
is a bad idea.  With this patch, arp monitoring works correctly again.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@osdl.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/net/bonding/bonding.h

index dc434fb6da85985def44a225789359a6b076a390..0978c9ac6d2b75940b14301ab82441b1f59f6a15 100644 (file)
@@ -151,8 +151,8 @@ struct slave {
        struct slave *next;
        struct slave *prev;
        int    delay;
-       u32    jiffies;
-       u32    last_arp_rx;
+       unsigned long jiffies;
+       unsigned long last_arp_rx;
        s8     link;    /* one of BOND_LINK_XXXX */
        s8     state;   /* one of BOND_STATE_XXXX */
        u32    original_flags;
@@ -242,7 +242,8 @@ extern inline int slave_do_arp_validate(struct bonding *bond, struct slave *slav
        return bond->params.arp_validate & (1 << slave->state);
 }
 
-extern inline u32 slave_last_rx(struct bonding *bond, struct slave *slave)
+extern inline unsigned long slave_last_rx(struct bonding *bond,
+                                       struct slave *slave)
 {
        if (slave_do_arp_validate(bond, slave))
                return slave->last_arp_rx;