diff options
Diffstat (limited to 'drivers/firewire/fw-topology.c')
-rw-r--r-- | drivers/firewire/fw-topology.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c index 8dd6703b55cd..d0deecc4de93 100644 --- a/drivers/firewire/fw-topology.c +++ b/drivers/firewire/fw-topology.c | |||
@@ -314,9 +314,8 @@ typedef void (*fw_node_callback_t)(struct fw_card * card, | |||
314 | struct fw_node * node, | 314 | struct fw_node * node, |
315 | struct fw_node * parent); | 315 | struct fw_node * parent); |
316 | 316 | ||
317 | static void | 317 | static void for_each_fw_node(struct fw_card *card, struct fw_node *root, |
318 | for_each_fw_node(struct fw_card *card, struct fw_node *root, | 318 | fw_node_callback_t callback) |
319 | fw_node_callback_t callback) | ||
320 | { | 319 | { |
321 | struct list_head list; | 320 | struct list_head list; |
322 | struct fw_node *node, *next, *child, *parent; | 321 | struct fw_node *node, *next, *child, *parent; |
@@ -349,9 +348,8 @@ for_each_fw_node(struct fw_card *card, struct fw_node *root, | |||
349 | fw_node_put(node); | 348 | fw_node_put(node); |
350 | } | 349 | } |
351 | 350 | ||
352 | static void | 351 | static void report_lost_node(struct fw_card *card, |
353 | report_lost_node(struct fw_card *card, | 352 | struct fw_node *node, struct fw_node *parent) |
354 | struct fw_node *node, struct fw_node *parent) | ||
355 | { | 353 | { |
356 | fw_node_event(card, node, FW_NODE_DESTROYED); | 354 | fw_node_event(card, node, FW_NODE_DESTROYED); |
357 | fw_node_put(node); | 355 | fw_node_put(node); |
@@ -360,9 +358,8 @@ report_lost_node(struct fw_card *card, | |||
360 | card->bm_retries = 0; | 358 | card->bm_retries = 0; |
361 | } | 359 | } |
362 | 360 | ||
363 | static void | 361 | static void report_found_node(struct fw_card *card, |
364 | report_found_node(struct fw_card *card, | 362 | struct fw_node *node, struct fw_node *parent) |
365 | struct fw_node *node, struct fw_node *parent) | ||
366 | { | 363 | { |
367 | int b_path = (node->phy_speed == SCODE_BETA); | 364 | int b_path = (node->phy_speed == SCODE_BETA); |
368 | 365 | ||
@@ -415,8 +412,7 @@ static void move_tree(struct fw_node *node0, struct fw_node *node1, int port) | |||
415 | * found, lost or updated. Update the nodes in the card topology tree | 412 | * found, lost or updated. Update the nodes in the card topology tree |
416 | * as we go. | 413 | * as we go. |
417 | */ | 414 | */ |
418 | static void | 415 | static void update_tree(struct fw_card *card, struct fw_node *root) |
419 | update_tree(struct fw_card *card, struct fw_node *root) | ||
420 | { | 416 | { |
421 | struct list_head list0, list1; | 417 | struct list_head list0, list1; |
422 | struct fw_node *node0, *node1, *next1; | 418 | struct fw_node *node0, *node1, *next1; |
@@ -497,8 +493,8 @@ update_tree(struct fw_card *card, struct fw_node *root) | |||
497 | } | 493 | } |
498 | } | 494 | } |
499 | 495 | ||
500 | static void | 496 | static void update_topology_map(struct fw_card *card, |
501 | update_topology_map(struct fw_card *card, u32 *self_ids, int self_id_count) | 497 | u32 *self_ids, int self_id_count) |
502 | { | 498 | { |
503 | int node_count; | 499 | int node_count; |
504 | 500 | ||
@@ -510,10 +506,8 @@ update_topology_map(struct fw_card *card, u32 *self_ids, int self_id_count) | |||
510 | fw_compute_block_crc(card->topology_map); | 506 | fw_compute_block_crc(card->topology_map); |
511 | } | 507 | } |
512 | 508 | ||
513 | void | 509 | void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, |
514 | fw_core_handle_bus_reset(struct fw_card *card, | 510 | int self_id_count, u32 *self_ids) |
515 | int node_id, int generation, | ||
516 | int self_id_count, u32 * self_ids) | ||
517 | { | 511 | { |
518 | struct fw_node *local_node; | 512 | struct fw_node *local_node; |
519 | unsigned long flags; | 513 | unsigned long flags; |
@@ -532,6 +526,7 @@ fw_core_handle_bus_reset(struct fw_card *card, | |||
532 | 526 | ||
533 | spin_lock_irqsave(&card->lock, flags); | 527 | spin_lock_irqsave(&card->lock, flags); |
534 | 528 | ||
529 | card->broadcast_channel_allocated = false; | ||
535 | card->node_id = node_id; | 530 | card->node_id = node_id; |
536 | /* | 531 | /* |
537 | * Update node_id before generation to prevent anybody from using | 532 | * Update node_id before generation to prevent anybody from using |