netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: netdev@vger.kernel.org, jgarzik@pobox.com
Cc: andy@greyhouse.net, Jay Vosburgh <fubar@us.ibm.com>
Subject: [PATCH] 	Two small fixes to IPoIB support for bonding:
Date: Wed, 17 Oct 2007 17:37:46 -0700	[thread overview]
Message-ID: <11926678763205-git-send-email-fubar@us.ibm.com> (raw)
In-Reply-To: <1192667875793-git-send-email-fubar@us.ibm.com>

	1- copy header_ops from slave to bonding for IPoIB slaves
	2- move release and destroy logic to UNREGISTER from GOING_DOWN
	   notifier to prevent double release

	Set bonding to version 3.2.1.
---
 drivers/net/bonding/bond_main.c |   11 +++++------
 drivers/net/bonding/bonding.h   |    4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index db80f24..6f85cc3 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1263,6 +1263,7 @@ static void bond_setup_by_slave(struct net_device *bond_dev,
 	struct bonding *bond = bond_dev->priv;
 
 	bond_dev->neigh_setup           = slave_dev->neigh_setup;
+	bond_dev->header_ops		= slave_dev->header_ops;
 
 	bond_dev->type		    = slave_dev->type;
 	bond_dev->hard_header_len   = slave_dev->hard_header_len;
@@ -3351,7 +3352,10 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave
 	switch (event) {
 	case NETDEV_UNREGISTER:
 		if (bond_dev) {
-			bond_release(bond_dev, slave_dev);
+			if (bond->setup_by_slave)
+				bond_release_and_destroy(bond_dev, slave_dev);
+			else
+				bond_release(bond_dev, slave_dev);
 		}
 		break;
 	case NETDEV_CHANGE:
@@ -3366,11 +3370,6 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave
 		 * ... Or is it this?
 		 */
 		break;
-	case NETDEV_GOING_DOWN:
-		dprintk("slave %s is going down\n", slave_dev->name);
-		if (bond->setup_by_slave)
-			bond_release_and_destroy(bond_dev, slave_dev);
-		break;
 	case NETDEV_CHANGEMTU:
 		/*
 		 * TODO: Should slaves be allowed to
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index a8bbd56..b818060 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -22,8 +22,8 @@
 #include "bond_3ad.h"
 #include "bond_alb.h"
 
-#define DRV_VERSION	"3.2.0"
-#define DRV_RELDATE	"September 13, 2007"
+#define DRV_VERSION	"3.2.1"
+#define DRV_RELDATE	"October 15, 2007"
 #define DRV_NAME	"bonding"
 #define DRV_DESCRIPTION	"Ethernet Channel Bonding Driver"
 
-- 
1.5.3.1


  reply	other threads:[~2007-10-18  0:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18  0:37 [PATCH 0/6] bonding workqueue and lock rework Jay Vosburgh
2007-10-18  0:37 ` [PATCH 1/6] Convert bonding timers to workqueues Jay Vosburgh
2007-10-18  0:37   ` Jay Vosburgh [this message]
2007-10-18  0:37     ` [PATCH 2/6] Convert balance-rr transmit to new locking Jay Vosburgh
2007-10-18  0:37       ` [PATCH 3/6] Convert miimon " Jay Vosburgh
2007-10-18  0:37         ` [PATCH 4/6] Convert locks to _bh, rework alb locking for " Jay Vosburgh
2007-10-18  0:37           ` [PATCH 5/6] Convert more locks to _bh, acquire rtnl, " Jay Vosburgh
2007-10-18  0:37             ` [PATCH 6/6] Acquire correct locks in alb for promisc change Jay Vosburgh
2007-10-18  1:15     ` [PATCH] Two small fixes to IPoIB support for bonding: Jay Vosburgh
2007-10-24  0:42   ` [PATCH 1/6] Convert bonding timers to workqueues Jeff Garzik
2007-10-24  1:00     ` Jay Vosburgh
2007-10-24  1:13       ` Andy Gospodarek
2007-10-24  1:19         ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11926678763205-git-send-email-fubar@us.ibm.com \
    --to=fubar@us.ibm.com \
    --cc=andy@greyhouse.net \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).