aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-topology.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-11-29 12:56:47 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-01-04 17:50:38 -0500
commitd6f95a3d14dc403881b23ad268ec1e3600c4e6b4 (patch)
tree5c5662fed71f11afa75d55ea5179e7d47da6a24a /drivers/firewire/fw-topology.c
parent0fa1986f3a6c385b3bca0b6a051c30e548bda30d (diff)
firewire: fix resetting of bus manager retry counter
An earlier change, maybe long ago, removed the copying of self_id_count into card->self_id_count. Since then each bus reset cleared card->bm_retries even when it shouldn't. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-topology.c')
-rw-r--r--drivers/firewire/fw-topology.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c
index 7687dca1a690..c9be6e6948c4 100644
--- a/drivers/firewire/fw-topology.c
+++ b/drivers/firewire/fw-topology.c
@@ -355,6 +355,9 @@ report_lost_node(struct fw_card *card,
355{ 355{
356 fw_node_event(card, node, FW_NODE_DESTROYED); 356 fw_node_event(card, node, FW_NODE_DESTROYED);
357 fw_node_put(node); 357 fw_node_put(node);
358
359 /* Topology has changed - reset bus manager retry counter */
360 card->bm_retries = 0;
358} 361}
359 362
360static void 363static void
@@ -374,6 +377,9 @@ report_found_node(struct fw_card *card,
374 } 377 }
375 378
376 fw_node_event(card, node, FW_NODE_CREATED); 379 fw_node_event(card, node, FW_NODE_CREATED);
380
381 /* Topology has changed - reset bus manager retry counter */
382 card->bm_retries = 0;
377} 383}
378 384
379void fw_destroy_nodes(struct fw_card *card) 385void fw_destroy_nodes(struct fw_card *card)
@@ -514,14 +520,6 @@ fw_core_handle_bus_reset(struct fw_card *card,
514 520
515 spin_lock_irqsave(&card->lock, flags); 521 spin_lock_irqsave(&card->lock, flags);
516 522
517 /*
518 * If the new topology has a different self_id_count the topology
519 * changed, either nodes were added or removed. In that case we
520 * reset the IRM reset counter.
521 */
522 if (card->self_id_count != self_id_count)
523 card->bm_retries = 0;
524
525 card->node_id = node_id; 523 card->node_id = node_id;
526 /* 524 /*
527 * Update node_id before generation to prevent anybody from using 525 * Update node_id before generation to prevent anybody from using