|
@@ -1542,12 +1542,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
|
|
bond_dev->name, slave_dev->name);
|
|
bond_dev->name, slave_dev->name);
|
|
}
|
|
}
|
|
|
|
|
|
- /* bond must be initialized by bond_open() before enslaving */
|
|
|
|
- if (!(bond_dev->flags & IFF_UP)) {
|
|
|
|
- pr_warning("%s: master_dev is not up in bond_enslave\n",
|
|
|
|
- bond_dev->name);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* already enslaved */
|
|
/* already enslaved */
|
|
if (slave_dev->flags & IFF_SLAVE) {
|
|
if (slave_dev->flags & IFF_SLAVE) {
|
|
pr_debug("Error, Device was already enslaved\n");
|
|
pr_debug("Error, Device was already enslaved\n");
|
|
@@ -4834,9 +4828,19 @@ static int bond_init(struct net_device *bond_dev)
|
|
{
|
|
{
|
|
struct bonding *bond = netdev_priv(bond_dev);
|
|
struct bonding *bond = netdev_priv(bond_dev);
|
|
struct bond_net *bn = net_generic(dev_net(bond_dev), bond_net_id);
|
|
struct bond_net *bn = net_generic(dev_net(bond_dev), bond_net_id);
|
|
|
|
+ struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
|
|
|
|
|
|
pr_debug("Begin bond_init for %s\n", bond_dev->name);
|
|
pr_debug("Begin bond_init for %s\n", bond_dev->name);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Initialize locks that may be required during
|
|
|
|
+ * en/deslave operations. All of the bond_open work
|
|
|
|
+ * (of which this is part) should really be moved to
|
|
|
|
+ * a phase prior to dev_open
|
|
|
|
+ */
|
|
|
|
+ spin_lock_init(&(bond_info->tx_hashtbl_lock));
|
|
|
|
+ spin_lock_init(&(bond_info->rx_hashtbl_lock));
|
|
|
|
+
|
|
bond->wq = create_singlethread_workqueue(bond_dev->name);
|
|
bond->wq = create_singlethread_workqueue(bond_dev->name);
|
|
if (!bond->wq)
|
|
if (!bond->wq)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|