diff options
author | David S. Miller <davem@davemloft.net> | 2009-05-19 00:08:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-19 00:08:20 -0400 |
commit | bb803cfbecb03a0cf8dc7e1864f18dda6631af00 (patch) | |
tree | 6c0989693bea6f50cfa5c6bb14f52ec19668def3 /drivers/net/bonding | |
parent | 3878fb6fdbceecca20b15748f807340854220f06 (diff) | |
parent | 511e11e396dc596825ce04d53d7f6d579404bc01 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/scsi/fcoe/fcoe.c
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 11 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 06009dc50b19..d4b570886c6e 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -1465,6 +1465,12 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best, | |||
1465 | return best; | 1465 | return best; |
1466 | } | 1466 | } |
1467 | 1467 | ||
1468 | static int agg_device_up(const struct aggregator *agg) | ||
1469 | { | ||
1470 | return (netif_running(agg->slave->dev) && | ||
1471 | netif_carrier_ok(agg->slave->dev)); | ||
1472 | } | ||
1473 | |||
1468 | /** | 1474 | /** |
1469 | * ad_agg_selection_logic - select an aggregation group for a team | 1475 | * ad_agg_selection_logic - select an aggregation group for a team |
1470 | * @aggregator: the aggregator we're looking at | 1476 | * @aggregator: the aggregator we're looking at |
@@ -1496,14 +1502,13 @@ static void ad_agg_selection_logic(struct aggregator *agg) | |||
1496 | struct port *port; | 1502 | struct port *port; |
1497 | 1503 | ||
1498 | origin = agg; | 1504 | origin = agg; |
1499 | |||
1500 | active = __get_active_agg(agg); | 1505 | active = __get_active_agg(agg); |
1501 | best = active; | 1506 | best = (active && agg_device_up(active)) ? active : NULL; |
1502 | 1507 | ||
1503 | do { | 1508 | do { |
1504 | agg->is_active = 0; | 1509 | agg->is_active = 0; |
1505 | 1510 | ||
1506 | if (agg->num_of_ports) | 1511 | if (agg->num_of_ports && agg_device_up(agg)) |
1507 | best = ad_agg_selection_test(best, agg); | 1512 | best = ad_agg_selection_test(best, agg); |
1508 | 1513 | ||
1509 | } while ((agg = __get_next_agg(agg))); | 1514 | } while ((agg = __get_next_agg(agg))); |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 30b9ea6d62b0..96d7689995cd 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -5199,7 +5199,6 @@ static int __init bonding_init(void) | |||
5199 | { | 5199 | { |
5200 | int i; | 5200 | int i; |
5201 | int res; | 5201 | int res; |
5202 | struct bonding *bond; | ||
5203 | 5202 | ||
5204 | printk(KERN_INFO "%s", version); | 5203 | printk(KERN_INFO "%s", version); |
5205 | 5204 | ||
@@ -5228,13 +5227,6 @@ static int __init bonding_init(void) | |||
5228 | 5227 | ||
5229 | goto out; | 5228 | goto out; |
5230 | err: | 5229 | err: |
5231 | list_for_each_entry(bond, &bond_dev_list, bond_list) { | ||
5232 | bond_work_cancel_all(bond); | ||
5233 | destroy_workqueue(bond->wq); | ||
5234 | } | ||
5235 | |||
5236 | bond_destroy_sysfs(); | ||
5237 | |||
5238 | rtnl_lock(); | 5230 | rtnl_lock(); |
5239 | bond_free_all(); | 5231 | bond_free_all(); |
5240 | rtnl_unlock(); | 5232 | rtnl_unlock(); |