upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / drivers / net / bonding / bond_main.c
index c93e5e8..654a79f 100644 (file)
  *       * Add support for VLAN hardware acceleration capable slaves.
  *       * Add capability to tag self generated packets in ALB/TLB modes.
  *       Set version to 2.6.0.
+ * 2004/10/29 - Mitch Williams <mitch.a.williams at intel dot com>
+ *      - Fixed bug when unloading module while using 802.3ad.  If
+ *        spinlock debugging is turned on, this causes a stack dump.
+ *        Solution is to move call to dev_remove_pack outside of the
+ *        spinlock.
+ *        Set version to 2.6.1.
+ *
  */
 
 //#define BONDING_DEBUG 1
 #include <linux/socket.h>
 #include <linux/ctype.h>
 #include <linux/inet.h>
+#include <linux/bitops.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/uaccess.h>
@@ -3566,15 +3573,15 @@ static int bond_close(struct net_device *bond_dev)
 {
        struct bonding *bond = bond_dev->priv;
 
-       write_lock_bh(&bond->lock);
-
-       bond_mc_list_destroy(bond);
-
        if (bond->params.mode == BOND_MODE_8023AD) {
                /* Unregister the receive of LACPDUs */
                bond_unregister_lacpdu(bond);
        }
 
+       write_lock_bh(&bond->lock);
+
+       bond_mc_list_destroy(bond);
+
        /* signal timers not to re-arm */
        bond->kill_timers = 1;