diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-03-07 12:12:36 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-09 16:03:05 -0500 |
commit | 937f687969f77bfeee5efd71cadfa6f1a813665e (patch) | |
tree | b9b691299676369ffb1882ba668fa89e9675312b /drivers/firewire/fw-card.c | |
parent | 65efffa8f0cd86a199bf19ede5c91552d35c5a38 (diff) |
firewire: Let an fw_descriptor specify a leading immediate key/value pair.
This lets us break out "Juju" as the model name in the config rom.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-card.c')
-rw-r--r-- | drivers/firewire/fw-card.c | 7 |
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); |