summaryrefslogtreecommitdiff
path: root/include/linux/firewire.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2025-09-16 08:47:44 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2025-09-16 08:52:18 +0900
commit7d138cb269dbd2fa9b0da89a9c10503d1cf269d5 (patch)
treeabd041abee308bbfc243ac12e502c3e660766ba2 /include/linux/firewire.h
parent07c446e35b89bc8774792f8036e595cffdf5b162 (diff)
firewire: core: use spin lock specific to topology map
At present, the operation for read transaction to topology map register is not protected by any kind of lock primitives. This causes a potential problem to result in the mixed content of topology map. This commit adds and uses spin lock specific to topology map. Link: https://lore.kernel.org/r/20250915234747.915922-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'include/linux/firewire.h')
-rw-r--r--include/linux/firewire.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index f3260aacf730..aeb71c39e57e 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -129,7 +129,11 @@ struct fw_card {
bool broadcast_channel_allocated;
u32 broadcast_channel;
- __be32 topology_map[(CSR_TOPOLOGY_MAP_END - CSR_TOPOLOGY_MAP) / 4];
+
+ struct {
+ __be32 buffer[(CSR_TOPOLOGY_MAP_END - CSR_TOPOLOGY_MAP) / 4];
+ spinlock_t lock;
+ } topology_map;
__be32 maint_utility_register;