summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-20 14:59:33 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-20 14:59:33 -0800
commit6fe4c6d466e95d31164f14b1ac4aefb51f0f4f82 (patch)
tree54dd0130534a0e20195f45ece12421c604064d01 /drivers/net/bonding
parenta4cc3889f7e2c3f2fd15b492822c889fed5e1800 (diff)
parent9cc20b268a5a14f5e57b8ad405a83513ab0d78dc (diff)
downloadop-kernel-dev-6fe4c6d466e95d31164f14b1ac4aefb51f0f4f82.zip
op-kernel-dev-6fe4c6d466e95d31164f14b1ac4aefb51f0f4f82.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits) ipv4: fix redirect handling ping: dont increment ICMP_MIB_INERRORS sky2: fix hang in napi_disable sky2: enforce minimum ring size bonding: Don't allow mode change via sysfs with slaves present f_phonet: fix page offset of first received fragment stmmac: fix pm functions avoiding sleep on spinlock stmmac: remove spin_lock in stmmac_ioctl. stmmac: parameters auto-tuning through HW cap reg stmmac: fix advertising 1000Base capabilties for non GMII iface stmmac: use mdelay on timeout of sw reset sky2: version 1.30 sky2: used fixed RSS key sky2: reduce default Tx ring size sky2: rename up/down functions sky2: pci posting issues sky2: fix hang on shutdown (and other irq issues) r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list MAINTAINERS: change email address for shemminger pch_gbe: Move #include of module.h ...
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_sysfs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 5a20804..4ef7e2f 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -319,6 +319,13 @@ static ssize_t bonding_store_mode(struct device *d,
goto out;
}
+ if (bond->slave_cnt > 0) {
+ pr_err("unable to update mode of %s because it has slaves.\n",
+ bond->dev->name);
+ ret = -EPERM;
+ goto out;
+ }
+
new_value = bond_parse_parm(buf, bond_mode_tbl);
if (new_value < 0) {
pr_err("%s: Ignoring invalid mode value %.*s.\n",
OpenPOWER on IntegriCloud