Skip to content

Commit 7254a2b

Browse files
committed
Merge tag 'firewire-fixes-6.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewire fixes from Takashi Sakamoto: "This includes some fixes for the topology map, newly introduced in v6.18 kernel" * tag 'firewire-fixes-6.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: core: fix to update generation field in topology map firewire: core: Initialize topology_map.lock
2 parents 87751e7 + 1107aac commit 7254a2b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/firewire/core-card.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ void fw_card_initialize(struct fw_card *card,
577577
INIT_LIST_HEAD(&card->transactions.list);
578578
spin_lock_init(&card->transactions.lock);
579579

580+
spin_lock_init(&card->topology_map.lock);
581+
580582
card->split_timeout.hi = DEFAULT_SPLIT_TIMEOUT / 8000;
581583
card->split_timeout.lo = (DEFAULT_SPLIT_TIMEOUT % 8000) << 19;
582584
card->split_timeout.cycles = DEFAULT_SPLIT_TIMEOUT;

drivers/firewire/core-topology.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,13 @@ static void update_topology_map(__be32 *buffer, size_t buffer_size, int root_nod
441441
const u32 *self_ids, int self_id_count)
442442
{
443443
__be32 *map = buffer;
444+
u32 next_generation = be32_to_cpu(buffer[1]) + 1;
444445
int node_count = (root_node_id & 0x3f) + 1;
445446

446447
memset(map, 0, buffer_size);
447448

448449
*map++ = cpu_to_be32((self_id_count + 2) << 16);
449-
*map++ = cpu_to_be32(be32_to_cpu(buffer[1]) + 1);
450+
*map++ = cpu_to_be32(next_generation);
450451
*map++ = cpu_to_be32((node_count << 16) | self_id_count);
451452

452453
while (self_id_count--)

0 commit comments

Comments
 (0)