]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
firewire: fix resetting of bus manager retry counter
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 29 Nov 2008 17:56:47 +0000 (18:56 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 4 Jan 2009 22:50:38 +0000 (23:50 +0100)
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>
drivers/firewire/fw-topology.c
drivers/firewire/fw-transaction.h

index 7687dca1a6902d937b9b4244dc282d6dc1d56087..c9be6e6948c4aec745e71a3cd25e4990ebf65f57 100644 (file)
@@ -355,6 +355,9 @@ report_lost_node(struct fw_card *card,
 {
        fw_node_event(card, node, FW_NODE_DESTROYED);
        fw_node_put(node);
+
+       /* Topology has changed - reset bus manager retry counter */
+       card->bm_retries = 0;
 }
 
 static void
@@ -374,6 +377,9 @@ report_found_node(struct fw_card *card,
        }
 
        fw_node_event(card, node, FW_NODE_CREATED);
+
+       /* Topology has changed - reset bus manager retry counter */
+       card->bm_retries = 0;
 }
 
 void fw_destroy_nodes(struct fw_card *card)
@@ -514,14 +520,6 @@ fw_core_handle_bus_reset(struct fw_card *card,
 
        spin_lock_irqsave(&card->lock, flags);
 
-       /*
-        * If the new topology has a different self_id_count the topology
-        * changed, either nodes were added or removed. In that case we
-        * reset the IRM reset counter.
-        */
-       if (card->self_id_count != self_id_count)
-               card->bm_retries = 0;
-
        card->node_id = node_id;
        /*
         * Update node_id before generation to prevent anybody from using
index 0497a18dc59e04b92269db9afe477f5ddc520fd7..5a57bb897e23b1e5b1ab76d31c38db0579124998 100644 (file)
@@ -241,7 +241,6 @@ struct fw_card {
         * We need to store up to 4 self ID for a maximum of 63
         * devices plus 3 words for the topology map header.
         */
-       int self_id_count;
        u32 topology_map[252 + 3];
        u32 broadcast_channel;