]> err.no Git - linux-2.6/commitdiff
firewire: Schedule topology work before calling driver update functions.
authorKristian Høgsberg <krh@redhat.com>
Tue, 6 Feb 2007 19:49:35 +0000 (14:49 -0500)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 9 Mar 2007 21:02:53 +0000 (22:02 +0100)
This prevents superfluous bus traffic as fw-sbp2 logs in only to
get kicked off the device by another bus reset as the driver core
does bus management.  Scheduling it this way lets the driver core
finish bus management before higher level drivers get the update
callback.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-topology.c

index 27c6cb9c8367452265c018451e97a7de13d1ded4..36c9be75b025b445e931ff494c344646f672e60c 100644 (file)
@@ -483,6 +483,7 @@ fw_core_handle_bus_reset(struct fw_card *card,
        card->generation = generation;
        memcpy(card->self_ids, self_ids, self_id_count * 4);
        card->reset_jiffies = jiffies;
+       schedule_delayed_work(&card->work, 0);
 
        local_node = build_tree(card);
 
@@ -498,8 +499,6 @@ fw_core_handle_bus_reset(struct fw_card *card,
                update_tree(card, local_node);
        }
 
-       schedule_delayed_work(&card->work, 0);
-
        spin_unlock_irqrestore(&card->lock, flags);
 }
 EXPORT_SYMBOL(fw_core_handle_bus_reset);