diff options
| author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-17 09:03:45 +0900 |
|---|---|---|
| committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-17 09:07:03 +0900 |
| commit | b460b317b21d5106f3ebd34bd51b851ad355a70a (patch) | |
| tree | faba1c4e140fffc3f869937444c7c2a5c451b804 | |
| parent | e0cda0dd12e08ecb8d26b8d78dc63e67e7069510 (diff) | |
| download | tip-b460b317b21d5106f3ebd34bd51b851ad355a70a.tar.gz | |
firewire: core: schedule bm_work item outside of spin lock
Before (re)building topology tree, fw_core_handle_bus_reset() schedules
a work item under acquiring fw_card spin lock. The work item invokes
bm_work() which acquires the spin lock at first, then can be stalled to
wait until the building tree finishes. This is inconvenient.
This commit moves the timing to schedule the work item after releasing
the spin lock.
Link: https://lore.kernel.org/r/20250917000347.52369-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
| -rw-r--r-- | drivers/firewire/core-topology.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c index 8fa0772ee723f4..2f73bcd5696f2b 100644 --- a/drivers/firewire/core-topology.c +++ b/drivers/firewire/core-topology.c @@ -479,7 +479,6 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, card->reset_jiffies = get_jiffies_64(); card->bm_node_id = 0xffff; card->bm_abdicate = bm_abdicate; - fw_schedule_bm_work(card, 0); local_node = build_tree(card, self_ids, self_id_count, generation); @@ -496,6 +495,8 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, } } + fw_schedule_bm_work(card, 0); + // Just used by transaction layer. scoped_guard(spinlock, &card->topology_map.lock) { update_topology_map(card->topology_map.buffer, sizeof(card->topology_map.buffer), |
