summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-card.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-03-07 12:12:36 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 22:03:05 +0100
commit937f687969f77bfeee5efd71cadfa6f1a813665e (patch)
treeb9b691299676369ffb1882ba668fa89e9675312b /drivers/firewire/fw-card.c
parent65efffa8f0cd86a199bf19ede5c91552d35c5a38 (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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
index 3f8661a52ac..8d7c12164bb 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)
i = 5;
config_rom[i++] = 0;
config_rom[i++] = 0x0c0083c0; /* node capabilities */
- config_rom[i++] = 0x03d00d1e; /* vendor id */
j = i + descriptor_count;
/* Generate root directory entries for descriptors. */
list_for_each_entry (desc, &descriptor_list, link) {
+ if (desc->immediate > 0)
+ config_rom[i++] = desc->immediate;
config_rom[i] = desc->key | (j - i);
i++;
j += desc->length;
@@ -165,6 +166,8 @@ fw_core_add_descriptor (struct fw_descriptor *desc)
list_add_tail (&desc->link, &descriptor_list);
descriptor_count++;
+ if (desc->immediate > 0)
+ descriptor_count++;
update_config_roms();
up_write(&fw_bus_type.subsys.rwsem);
@@ -180,6 +183,8 @@ fw_core_remove_descriptor (struct fw_descriptor *desc)
list_del(&desc->link);
descriptor_count--;
+ if (desc->immediate > 0)
+ descriptor_count--;
update_config_roms();
up_write(&fw_bus_type.subsys.rwsem);