aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-card.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-card.c')
-rw-r--r--drivers/firewire/fw-card.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
index 3f8661a52acc..8d7c12164bb3 100644
--- a/drivers/firewire/fw-card.c
+++ b/drivers/firewire/fw-card.c
@@ -100,11 +100,12 @@ generate_config_rom (struct fw_card *card, size_t *config_rom_length)
100 i = 5; 100 i = 5;
101 config_rom[i++] = 0; 101 config_rom[i++] = 0;
102 config_rom[i++] = 0x0c0083c0; /* node capabilities */ 102 config_rom[i++] = 0x0c0083c0; /* node capabilities */
103 config_rom[i++] = 0x03d00d1e; /* vendor id */
104 j = i + descriptor_count; 103 j = i + descriptor_count;
105 104
106 /* Generate root directory entries for descriptors. */ 105 /* Generate root directory entries for descriptors. */
107 list_for_each_entry (desc, &descriptor_list, link) { 106 list_for_each_entry (desc, &descriptor_list, link) {
107 if (desc->immediate > 0)
108 config_rom[i++] = desc->immediate;
108 config_rom[i] = desc->key | (j - i); 109 config_rom[i] = desc->key | (j - i);
109 i++; 110 i++;
110 j += desc->length; 111 j += desc->length;
@@ -165,6 +166,8 @@ fw_core_add_descriptor (struct fw_descriptor *desc)
165 166
166 list_add_tail (&desc->link, &descriptor_list); 167 list_add_tail (&desc->link, &descriptor_list);
167 descriptor_count++; 168 descriptor_count++;
169 if (desc->immediate > 0)
170 descriptor_count++;
168 update_config_roms(); 171 update_config_roms();
169 172
170 up_write(&fw_bus_type.subsys.rwsem); 173 up_write(&fw_bus_type.subsys.rwsem);
@@ -180,6 +183,8 @@ fw_core_remove_descriptor (struct fw_descriptor *desc)
180 183
181 list_del(&desc->link); 184 list_del(&desc->link);
182 descriptor_count--; 185 descriptor_count--;
186 if (desc->immediate > 0)
187 descriptor_count--;
183 update_config_roms(); 188 update_config_roms();
184 189
185 up_write(&fw_bus_type.subsys.rwsem); 190 up_write(&fw_bus_type.subsys.rwsem);