diff options
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 71ba18efa15b..1c6104d3501d 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1543,9 +1543,11 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1543 | bond_set_carrier(bond); | 1543 | bond_set_carrier(bond); |
1544 | 1544 | ||
1545 | if (USES_PRIMARY(bond->params.mode)) { | 1545 | if (USES_PRIMARY(bond->params.mode)) { |
1546 | block_netpoll_tx(); | ||
1546 | write_lock_bh(&bond->curr_slave_lock); | 1547 | write_lock_bh(&bond->curr_slave_lock); |
1547 | bond_select_active_slave(bond); | 1548 | bond_select_active_slave(bond); |
1548 | write_unlock_bh(&bond->curr_slave_lock); | 1549 | write_unlock_bh(&bond->curr_slave_lock); |
1550 | unblock_netpoll_tx(); | ||
1549 | } | 1551 | } |
1550 | 1552 | ||
1551 | pr_info("%s: enslaving %s as a%s interface with a%s link.\n", | 1553 | pr_info("%s: enslaving %s as a%s interface with a%s link.\n", |
@@ -1571,10 +1573,12 @@ err_detach: | |||
1571 | if (bond->primary_slave == new_slave) | 1573 | if (bond->primary_slave == new_slave) |
1572 | bond->primary_slave = NULL; | 1574 | bond->primary_slave = NULL; |
1573 | if (bond->curr_active_slave == new_slave) { | 1575 | if (bond->curr_active_slave == new_slave) { |
1576 | block_netpoll_tx(); | ||
1574 | write_lock_bh(&bond->curr_slave_lock); | 1577 | write_lock_bh(&bond->curr_slave_lock); |
1575 | bond_change_active_slave(bond, NULL); | 1578 | bond_change_active_slave(bond, NULL); |
1576 | bond_select_active_slave(bond); | 1579 | bond_select_active_slave(bond); |
1577 | write_unlock_bh(&bond->curr_slave_lock); | 1580 | write_unlock_bh(&bond->curr_slave_lock); |
1581 | unblock_netpoll_tx(); | ||
1578 | } | 1582 | } |
1579 | slave_disable_netpoll(new_slave); | 1583 | slave_disable_netpoll(new_slave); |
1580 | 1584 | ||
@@ -2864,9 +2868,12 @@ static int bond_slave_netdev_event(unsigned long event, | |||
2864 | pr_info("%s: Primary slave changed to %s, reselecting active slave.\n", | 2868 | pr_info("%s: Primary slave changed to %s, reselecting active slave.\n", |
2865 | bond->dev->name, bond->primary_slave ? slave_dev->name : | 2869 | bond->dev->name, bond->primary_slave ? slave_dev->name : |
2866 | "none"); | 2870 | "none"); |
2871 | |||
2872 | block_netpoll_tx(); | ||
2867 | write_lock_bh(&bond->curr_slave_lock); | 2873 | write_lock_bh(&bond->curr_slave_lock); |
2868 | bond_select_active_slave(bond); | 2874 | bond_select_active_slave(bond); |
2869 | write_unlock_bh(&bond->curr_slave_lock); | 2875 | write_unlock_bh(&bond->curr_slave_lock); |
2876 | unblock_netpoll_tx(); | ||
2870 | break; | 2877 | break; |
2871 | case NETDEV_FEAT_CHANGE: | 2878 | case NETDEV_FEAT_CHANGE: |
2872 | bond_compute_features(bond); | 2879 | bond_compute_features(bond); |
@@ -3700,7 +3707,7 @@ static inline int bond_slave_override(struct bonding *bond, | |||
3700 | 3707 | ||
3701 | 3708 | ||
3702 | static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb, | 3709 | static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb, |
3703 | void *accel_priv) | 3710 | void *accel_priv, select_queue_fallback_t fallback) |
3704 | { | 3711 | { |
3705 | /* | 3712 | /* |
3706 | * This helper function exists to help dev_pick_tx get the correct | 3713 | * This helper function exists to help dev_pick_tx get the correct |