diff options
author | David S. Miller <davem@davemloft.net> | 2011-08-20 13:39:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-20 13:39:12 -0400 |
commit | 823dcd2506fa369aeb8cbd26da5663efe2fda9a9 (patch) | |
tree | 853b3e3c05f0b9ee1b5df8464db19b7acc57150c /drivers/net/bonding | |
parent | eaa36660de7e174498618d69d7277d44a2f24c3d (diff) | |
parent | 98e77438aed3cd3343cbb86825127b1d9d2bea33 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e61a4e573536..8cb75a6efec3 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3419,9 +3419,27 @@ static int bond_xmit_hash_policy_l2(struct sk_buff *skb, int count) | |||
3419 | static int bond_open(struct net_device *bond_dev) | 3419 | static int bond_open(struct net_device *bond_dev) |
3420 | { | 3420 | { |
3421 | struct bonding *bond = netdev_priv(bond_dev); | 3421 | struct bonding *bond = netdev_priv(bond_dev); |
3422 | struct slave *slave; | ||
3423 | int i; | ||
3422 | 3424 | ||
3423 | bond->kill_timers = 0; | 3425 | bond->kill_timers = 0; |
3424 | 3426 | ||
3427 | /* reset slave->backup and slave->inactive */ | ||
3428 | read_lock(&bond->lock); | ||
3429 | if (bond->slave_cnt > 0) { | ||
3430 | read_lock(&bond->curr_slave_lock); | ||
3431 | bond_for_each_slave(bond, slave, i) { | ||
3432 | if ((bond->params.mode == BOND_MODE_ACTIVEBACKUP) | ||
3433 | && (slave != bond->curr_active_slave)) { | ||
3434 | bond_set_slave_inactive_flags(slave); | ||
3435 | } else { | ||
3436 | bond_set_slave_active_flags(slave); | ||
3437 | } | ||
3438 | } | ||
3439 | read_unlock(&bond->curr_slave_lock); | ||
3440 | } | ||
3441 | read_unlock(&bond->lock); | ||
3442 | |||
3425 | INIT_DELAYED_WORK(&bond->mcast_work, bond_resend_igmp_join_requests_delayed); | 3443 | INIT_DELAYED_WORK(&bond->mcast_work, bond_resend_igmp_join_requests_delayed); |
3426 | 3444 | ||
3427 | if (bond_is_lb(bond)) { | 3445 | if (bond_is_lb(bond)) { |