diff options
author | Jay Vosburgh <fubar@us.ibm.com> | 2007-10-17 20:37:45 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-23 20:32:00 -0400 |
commit | 1b76b31693d4a6088dec104ff6a6ead54081a3c2 (patch) | |
tree | d6353be6b4654ec85ab6cfe42d2c78fac9a755c8 /drivers/net/bonding/bond_3ad.c | |
parent | 15df5806c6fc94e607632bba70328194905e988f (diff) |
Convert bonding timers to workqueues
Convert bonding timers to workqueues. This converts the various
monitor functions to run in periodic work queues instead of timers. This
patch introduces the framework and convers the calls, but does not resolve
various locking issues, and does not stand alone.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 084f0292ea6e..cb3c6faa7888 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -2076,8 +2076,10 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
2076 | * times out, and it selects an aggregator for the ports that are yet not | 2076 | * times out, and it selects an aggregator for the ports that are yet not |
2077 | * related to any aggregator, and selects the active aggregator for a bond. | 2077 | * related to any aggregator, and selects the active aggregator for a bond. |
2078 | */ | 2078 | */ |
2079 | void bond_3ad_state_machine_handler(struct bonding *bond) | 2079 | void bond_3ad_state_machine_handler(struct work_struct *work) |
2080 | { | 2080 | { |
2081 | struct bonding *bond = container_of(work, struct bonding, | ||
2082 | ad_work.work); | ||
2081 | struct port *port; | 2083 | struct port *port; |
2082 | struct aggregator *aggregator; | 2084 | struct aggregator *aggregator; |
2083 | 2085 | ||
@@ -2128,7 +2130,7 @@ void bond_3ad_state_machine_handler(struct bonding *bond) | |||
2128 | } | 2130 | } |
2129 | 2131 | ||
2130 | re_arm: | 2132 | re_arm: |
2131 | mod_timer(&(BOND_AD_INFO(bond).ad_timer), jiffies + ad_delta_in_ticks); | 2133 | queue_delayed_work(bond->wq, &bond->ad_work, ad_delta_in_ticks); |
2132 | out: | 2134 | out: |
2133 | read_unlock(&bond->lock); | 2135 | read_unlock(&bond->lock); |
2134 | } | 2136 | } |