aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/firewire/fw-topology.c14
-rw-r--r--drivers/firewire/fw-transaction.h1
2 files changed, 6 insertions, 9 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
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h
index 0497a18dc59e..5a57bb897e23 100644
--- a/drivers/firewire/fw-transaction.h
+++ b/drivers/firewire/fw-transaction.h
@@ -241,7 +241,6 @@ struct fw_card {
241 * We need to store up to 4 self ID for a maximum of 63 241 * We need to store up to 4 self ID for a maximum of 63
242 * devices plus 3 words for the topology map header. 242 * devices plus 3 words for the topology map header.
243 */ 243 */
244 int self_id_count;
245 u32 topology_map[252 + 3]; 244 u32 topology_map[252 + 3];
246 u32 broadcast_channel; 245 u32 broadcast_channel;
247 246