diff options
-rw-r--r-- | drivers/net/bonding/bond_main.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b46cb139477d..ecbe206f90d1 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -184,9 +184,6 @@ static int arp_ip_count; | |||
184 | static int bond_mode = BOND_MODE_ROUNDROBIN; | 184 | static int bond_mode = BOND_MODE_ROUNDROBIN; |
185 | static int xmit_hashtype = BOND_XMIT_POLICY_LAYER2; | 185 | static int xmit_hashtype = BOND_XMIT_POLICY_LAYER2; |
186 | static int lacp_fast; | 186 | static int lacp_fast; |
187 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
188 | static int disable_netpoll = 1; | ||
189 | #endif | ||
190 | 187 | ||
191 | const struct bond_parm_tbl bond_lacp_tbl[] = { | 188 | const struct bond_parm_tbl bond_lacp_tbl[] = { |
192 | { "slow", AD_LACP_SLOW}, | 189 | { "slow", AD_LACP_SLOW}, |
@@ -1811,19 +1808,15 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1811 | bond_set_carrier(bond); | 1808 | bond_set_carrier(bond); |
1812 | 1809 | ||
1813 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1810 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1814 | if (disable_netpoll) { | 1811 | if (slaves_support_netpoll(bond_dev)) { |
1812 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | ||
1813 | if (bond_dev->npinfo) | ||
1814 | slave_dev->npinfo = bond_dev->npinfo; | ||
1815 | } else if (!(bond_dev->priv_flags & IFF_DISABLE_NETPOLL)) { | ||
1815 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; | 1816 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; |
1816 | } else { | 1817 | pr_info("New slave device %s does not support netpoll\n", |
1817 | if (slaves_support_netpoll(bond_dev)) { | 1818 | slave_dev->name); |
1818 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | 1819 | pr_info("Disabling netpoll support for %s\n", bond_dev->name); |
1819 | if (bond_dev->npinfo) | ||
1820 | slave_dev->npinfo = bond_dev->npinfo; | ||
1821 | } else if (!(bond_dev->priv_flags & IFF_DISABLE_NETPOLL)) { | ||
1822 | bond_dev->priv_flags |= IFF_DISABLE_NETPOLL; | ||
1823 | pr_info("New slave device %s does not support netpoll\n", | ||
1824 | slave_dev->name); | ||
1825 | pr_info("Disabling netpoll support for %s\n", bond_dev->name); | ||
1826 | } | ||
1827 | } | 1820 | } |
1828 | #endif | 1821 | #endif |
1829 | read_unlock(&bond->lock); | 1822 | read_unlock(&bond->lock); |
@@ -2030,10 +2023,8 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) | |||
2030 | #ifdef CONFIG_NET_POLL_CONTROLLER | 2023 | #ifdef CONFIG_NET_POLL_CONTROLLER |
2031 | read_lock_bh(&bond->lock); | 2024 | read_lock_bh(&bond->lock); |
2032 | 2025 | ||
2033 | /* Make sure netpoll over stays disabled until fixed. */ | 2026 | if (slaves_support_netpoll(bond_dev)) |
2034 | if (!disable_netpoll) | 2027 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; |
2035 | if (slaves_support_netpoll(bond_dev)) | ||
2036 | bond_dev->priv_flags &= ~IFF_DISABLE_NETPOLL; | ||
2037 | read_unlock_bh(&bond->lock); | 2028 | read_unlock_bh(&bond->lock); |
2038 | if (slave_dev->netdev_ops->ndo_netpoll_cleanup) | 2029 | if (slave_dev->netdev_ops->ndo_netpoll_cleanup) |
2039 | slave_dev->netdev_ops->ndo_netpoll_cleanup(slave_dev); | 2030 | slave_dev->netdev_ops->ndo_netpoll_cleanup(slave_dev); |