| To: | fubar@xxxxxxxxxx, bonding-devel@xxxxxxxxxxxxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 2.6.13-rc1 7/17] bonding: make sysfs consistent with ifenslave behavior |
| From: | Radheka Godse <radheka.godse@xxxxxxxxx> |
| Date: | Fri, 1 Jul 2005 13:47:04 -0700 (PDT) |
| Cc: | netdev@xxxxxxxxxxx |
| Replyto: | "Radheka Godse" <radheka.godse@intel.com> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
For consistency with ifenslave, instead of exiting with an error, updated
bonding sysfs to close and attempt to enslave an up adapter.Signed-off-by: Radheka Godse <radheka.godse@xxxxxxxxx> Signed-off-by: Mitch Williams <mitch.a.williams@xxxxxxxxx> diff -urN -X dontdiff linux-2.6.12post/drivers/net/bonding/bond_main.c
linux-2.6.12post-sysfs/drivers/net/bonding/bond_main.c
--- linux-2.6.12post/drivers/net/bonding/bond_main.c 2005-06-28
18:18:03.000000000 -0700
+++ linux-2.6.12post-sysfs/drivers/net/bonding/bond_main.c 2005-06-30
13:53:55.000000000 -0700
@@ -1665,10 +1665,19 @@
*/
if ((slave_dev->flags & IFF_UP)) {
printk(KERN_ERR DRV_NAME
- ": Error: %s is up\n",
- slave_dev->name);
+ ": %s: Warning: %s is up. Closing it "
+ "before adding to the bond.\n",
+ bond_dev->name, slave_dev->name);
res = -EPERM;
- goto err_undo_flags;
+ res = dev_close(slave_dev);
+ if (res)
+ {
+ printk(KERN_ERR DRV_NAME
+ ": %s: Error: Failed to close %s.\n",
+ bond_dev->name, slave_dev->name);
+ res = -EPERM;
+ goto err_undo_flags;
+ }
} if (slave_dev->set_mac_address == NULL) { |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2.6.13-rc1 6/17] bonding: ALB init kmalloc inside spinlock bugfix, Radheka Godse |
|---|---|
| Next by Date: | [PATCH 2.6.13-rc1 8/17] bonding: SYSFS INTERFACE (large), Radheka Godse |
| Previous by Thread: | [PATCH 2.6.13-rc1 6/17] bonding: ALB init kmalloc inside spinlock bugfix, Radheka Godse |
| Next by Thread: | [PATCH 2.6.13-rc1 8/17] bonding: SYSFS INTERFACE (large), Radheka Godse |
| Indexes: | [Date] [Thread] [Top] [All Lists] |