diff options
-rw-r--r-- | drivers/net/bonding/bond_main.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 5e12462a9d5e..c3d98dde2f86 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -168,7 +168,7 @@ static int arp_ip_count; | |||
168 | static int bond_mode = BOND_MODE_ROUNDROBIN; | 168 | static int bond_mode = BOND_MODE_ROUNDROBIN; |
169 | static int xmit_hashtype = BOND_XMIT_POLICY_LAYER2; | 169 | static int xmit_hashtype = BOND_XMIT_POLICY_LAYER2; |
170 | static int lacp_fast; | 170 | static int lacp_fast; |
171 | 171 | static int disable_netpoll = 1; | |
172 | 172 | ||
173 | const struct bond_parm_tbl bond_lacp_tbl[] = { | 173 | const struct bond_parm_tbl bond_lacp_tbl[] = { |
174 | { "slow", AD_LACP_SLOW}, | 174 | { "slow", AD_LACP_SLOW}, |
@@ -1742,15 +1742,23 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1742 | bond_set_carrier(bond); | 1742 | bond_set_carrier(bond); |
1743 | 1743 | ||
1744 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1744 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1745 | if (slaves_support_netpoll(bond_dev)) { | 1745 | /* |
1746 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | 1746 | * Netpoll and bonding is broken, make sure it is not initialized |
1747 | if (bond_dev->npinfo) | 1747 | * until it is fixed. |
1748 | slave_dev->npinfo = bond_dev->npinfo; | 1748 | */ |
1749 | } else if (!(bond_dev->priv_flags & IFF_DISABLE_NETPOLL)) { | 1749 | if (disable_netpoll) { |
1750 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; | 1750 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; |
1751 | pr_info("New slave device %s does not support netpoll\n", | 1751 | } else { |
1752 | slave_dev->name); | 1752 | if (slaves_support_netpoll(bond_dev)) { |
1753 | pr_info("Disabling netpoll support for %s\n", bond_dev->name); | 1753 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; |
1754 | if (bond_dev->npinfo) | ||
1755 | slave_dev->npinfo = bond_dev->npinfo; | ||
1756 | } else if (!(bond_dev->priv_flags & IFF_DISABLE_NETPOLL)) { | ||
1757 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; | ||
1758 | pr_info("New slave device %s does not support netpoll\n", | ||
1759 | slave_dev->name); | ||
1760 | pr_info("Disabling netpoll support for %s\n", bond_dev->name); | ||
1761 | } | ||
1754 | } | 1762 | } |
1755 | #endif | 1763 | #endif |
1756 | read_unlock(&bond->lock); | 1764 | read_unlock(&bond->lock); |
@@ -1950,8 +1958,11 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1950 | 1958 | ||
1951 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1959 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1952 | read_lock_bh(&bond->lock); | 1960 | read_lock_bh(&bond->lock); |
1953 | if (slaves_support_netpoll(bond_dev)) | 1961 | |
1954 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | 1962 | /* Make sure netpoll over stays disabled until fixed. */ |
1963 | if (!disable_netpoll) | ||
1964 | if (slaves_support_netpoll(bond_dev)) | ||
1965 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | ||
1955 | read_unlock_bh(&bond->lock); | 1966 | read_unlock_bh(&bond->lock); |
1956 | if (slave_dev->netdev_ops->ndo_netpoll_cleanup) | 1967 | if (slave_dev->netdev_ops->ndo_netpoll_cleanup) |
1957 | slave_dev->netdev_ops->ndo_netpoll_cleanup(slave_dev); | 1968 | slave_dev->netdev_ops->ndo_netpoll_cleanup(slave_dev); |