]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firewire: core: detect device quirk when reading configuration ROM
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 13 Oct 2025 14:03:10 +0000 (23:03 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 13 Oct 2025 14:07:24 +0000 (23:07 +0900)
commit5a43dc9f4ee0a3624d0598ee14e8ef8468914525
tree50e392be886ed5946c5f904cb3020a25c3e162bb
parent3a8660878839faadb4f1a6dd72c3179c1df56787
firewire: core: detect device quirk when reading configuration ROM

Every time the bus manager runs, the cached configuration ROM content of
the IRM device is investigated to detect device-specific quirks. This
detection can be performed in advance when reading the configuration ROM.

This commit adds device quirk flags to the fw_device structure, and
initializes them after reading the bus information block of the
configuration ROM. The quirk flags are immutable once the configuration
ROM has been read. Although they are likely accessed concurrently only by
the bus manager, this commit ensures safe access by preventing torn writes
and reads using the WRITE_ONCE()/READ_ONCE() macros.

Link: https://lore.kernel.org/r/20251013140311.97159-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-card.c
drivers/firewire/core-device.c
include/linux/firewire.h