diff options
Diffstat (limited to 'drivers/firewire/core-topology.c')
-rw-r--r-- | drivers/firewire/core-topology.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c index 93ec64cdeef7..09be1a635505 100644 --- a/drivers/firewire/core-topology.c +++ b/drivers/firewire/core-topology.c | |||
@@ -174,12 +174,7 @@ static inline struct fw_node *fw_node(struct list_head *l) | |||
174 | return list_entry(l, struct fw_node, link); | 174 | return list_entry(l, struct fw_node, link); |
175 | } | 175 | } |
176 | 176 | ||
177 | /** | 177 | /* |
178 | * build_tree - Build the tree representation of the topology | ||
179 | * @self_ids: array of self IDs to create the tree from | ||
180 | * @self_id_count: the length of the self_ids array | ||
181 | * @local_id: the node ID of the local node | ||
182 | * | ||
183 | * This function builds the tree representation of the topology given | 178 | * This function builds the tree representation of the topology given |
184 | * by the self IDs from the latest bus reset. During the construction | 179 | * by the self IDs from the latest bus reset. During the construction |
185 | * of the tree, the function checks that the self IDs are valid and | 180 | * of the tree, the function checks that the self IDs are valid and |
@@ -420,11 +415,10 @@ static void move_tree(struct fw_node *node0, struct fw_node *node1, int port) | |||
420 | } | 415 | } |
421 | } | 416 | } |
422 | 417 | ||
423 | /** | 418 | /* |
424 | * update_tree - compare the old topology tree for card with the new | 419 | * Compare the old topology tree for card with the new one specified by root. |
425 | * one specified by root. Queue the nodes and mark them as either | 420 | * Queue the nodes and mark them as either found, lost or updated. |
426 | * found, lost or updated. Update the nodes in the card topology tree | 421 | * Update the nodes in the card topology tree as we go. |
427 | * as we go. | ||
428 | */ | 422 | */ |
429 | static void update_tree(struct fw_card *card, struct fw_node *root) | 423 | static void update_tree(struct fw_card *card, struct fw_node *root) |
430 | { | 424 | { |
@@ -524,7 +518,7 @@ static void update_topology_map(struct fw_card *card, | |||
524 | } | 518 | } |
525 | 519 | ||
526 | void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, | 520 | void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, |
527 | int self_id_count, u32 *self_ids) | 521 | int self_id_count, u32 *self_ids, bool bm_abdicate) |
528 | { | 522 | { |
529 | struct fw_node *local_node; | 523 | struct fw_node *local_node; |
530 | unsigned long flags; | 524 | unsigned long flags; |
@@ -543,7 +537,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, | |||
543 | 537 | ||
544 | spin_lock_irqsave(&card->lock, flags); | 538 | spin_lock_irqsave(&card->lock, flags); |
545 | 539 | ||
546 | card->broadcast_channel_allocated = false; | 540 | card->broadcast_channel_allocated = card->broadcast_channel_auto_allocated; |
547 | card->node_id = node_id; | 541 | card->node_id = node_id; |
548 | /* | 542 | /* |
549 | * Update node_id before generation to prevent anybody from using | 543 | * Update node_id before generation to prevent anybody from using |
@@ -552,6 +546,8 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, | |||
552 | smp_wmb(); | 546 | smp_wmb(); |
553 | card->generation = generation; | 547 | card->generation = generation; |
554 | card->reset_jiffies = jiffies; | 548 | card->reset_jiffies = jiffies; |
549 | card->bm_node_id = 0xffff; | ||
550 | card->bm_abdicate = bm_abdicate; | ||
555 | fw_schedule_bm_work(card, 0); | 551 | fw_schedule_bm_work(card, 0); |
556 | 552 | ||
557 | local_node = build_tree(card, self_ids, self_id_count); | 553 | local_node = build_tree(card, self_ids, self_id_count); |