diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:26:12 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-10-28 11:26:12 -0400 |
| commit | 7a9787e1eba95a166265e6a260cf30af04ef0a99 (patch) | |
| tree | e730a4565e0318140d2fbd2f0415d18a339d7336 /net/tipc/net.c | |
| parent | 41b9eb264c8407655db57b60b4457fe1b2ec9977 (diff) | |
| parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) | |
Merge commit 'v2.6.28-rc2' into x86/pci-ioapic-boot-irq-quirks
Diffstat (limited to 'net/tipc/net.c')
| -rw-r--r-- | net/tipc/net.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c index c39c76201e8e..7906608bf510 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
| @@ -118,7 +118,7 @@ | |||
| 118 | DEFINE_RWLOCK(tipc_net_lock); | 118 | DEFINE_RWLOCK(tipc_net_lock); |
| 119 | struct network tipc_net = { NULL }; | 119 | struct network tipc_net = { NULL }; |
| 120 | 120 | ||
| 121 | struct node *tipc_net_select_remote_node(u32 addr, u32 ref) | 121 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref) |
| 122 | { | 122 | { |
| 123 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); | 123 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); |
| 124 | } | 124 | } |
| @@ -165,7 +165,7 @@ static int net_init(void) | |||
| 165 | if (!tipc_net.zones) { | 165 | if (!tipc_net.zones) { |
| 166 | return -ENOMEM; | 166 | return -ENOMEM; |
| 167 | } | 167 | } |
| 168 | return TIPC_OK; | 168 | return 0; |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | static void net_stop(void) | 171 | static void net_stop(void) |
| @@ -266,7 +266,7 @@ void tipc_net_route_msg(struct sk_buff *buf) | |||
| 266 | tipc_link_send(buf, dnode, msg_link_selector(msg)); | 266 | tipc_link_send(buf, dnode, msg_link_selector(msg)); |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | int tipc_net_start(void) | 269 | int tipc_net_start(u32 addr) |
| 270 | { | 270 | { |
| 271 | char addr_string[16]; | 271 | char addr_string[16]; |
| 272 | int res; | 272 | int res; |
| @@ -274,6 +274,10 @@ int tipc_net_start(void) | |||
| 274 | if (tipc_mode != TIPC_NODE_MODE) | 274 | if (tipc_mode != TIPC_NODE_MODE) |
| 275 | return -ENOPROTOOPT; | 275 | return -ENOPROTOOPT; |
| 276 | 276 | ||
| 277 | tipc_subscr_stop(); | ||
| 278 | tipc_cfg_stop(); | ||
| 279 | |||
| 280 | tipc_own_addr = addr; | ||
| 277 | tipc_mode = TIPC_NET_MODE; | 281 | tipc_mode = TIPC_NET_MODE; |
| 278 | tipc_named_reinit(); | 282 | tipc_named_reinit(); |
| 279 | tipc_port_reinit(); | 283 | tipc_port_reinit(); |
| @@ -284,14 +288,14 @@ int tipc_net_start(void) | |||
| 284 | (res = tipc_bclink_init())) { | 288 | (res = tipc_bclink_init())) { |
| 285 | return res; | 289 | return res; |
| 286 | } | 290 | } |
| 287 | tipc_subscr_stop(); | 291 | |
| 288 | tipc_cfg_stop(); | ||
| 289 | tipc_k_signal((Handler)tipc_subscr_start, 0); | 292 | tipc_k_signal((Handler)tipc_subscr_start, 0); |
| 290 | tipc_k_signal((Handler)tipc_cfg_init, 0); | 293 | tipc_k_signal((Handler)tipc_cfg_init, 0); |
| 294 | |||
| 291 | info("Started in network mode\n"); | 295 | info("Started in network mode\n"); |
| 292 | info("Own node address %s, network identity %u\n", | 296 | info("Own node address %s, network identity %u\n", |
| 293 | addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); | 297 | addr_string_fill(addr_string, tipc_own_addr), tipc_net_id); |
| 294 | return TIPC_OK; | 298 | return 0; |
| 295 | } | 299 | } |
| 296 | 300 | ||
| 297 | void tipc_net_stop(void) | 301 | void tipc_net_stop(void) |
