mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
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
This commit is contained in:
@@ -577,6 +577,8 @@ void fw_card_initialize(struct fw_card *card,
|
||||
INIT_LIST_HEAD(&card->transactions.list);
|
||||
spin_lock_init(&card->transactions.lock);
|
||||
|
||||
spin_lock_init(&card->topology_map.lock);
|
||||
|
||||
card->split_timeout.hi = DEFAULT_SPLIT_TIMEOUT / 8000;
|
||||
card->split_timeout.lo = (DEFAULT_SPLIT_TIMEOUT % 8000) << 19;
|
||||
card->split_timeout.cycles = DEFAULT_SPLIT_TIMEOUT;
|
||||
|
||||
@@ -441,12 +441,13 @@ static void update_topology_map(__be32 *buffer, size_t buffer_size, int root_nod
|
||||
const u32 *self_ids, int self_id_count)
|
||||
{
|
||||
__be32 *map = buffer;
|
||||
u32 next_generation = be32_to_cpu(buffer[1]) + 1;
|
||||
int node_count = (root_node_id & 0x3f) + 1;
|
||||
|
||||
memset(map, 0, buffer_size);
|
||||
|
||||
*map++ = cpu_to_be32((self_id_count + 2) << 16);
|
||||
*map++ = cpu_to_be32(be32_to_cpu(buffer[1]) + 1);
|
||||
*map++ = cpu_to_be32(next_generation);
|
||||
*map++ = cpu_to_be32((node_count << 16) | self_id_count);
|
||||
|
||||
while (self_id_count--)
|
||||
|
||||
Reference in New Issue
Block a user