diff options
-rw-r--r-- | drivers/firewire/fw-card.c | 7 | ||||
-rw-r--r-- | drivers/firewire/fw-transaction.c | 34 | ||||
-rw-r--r-- | drivers/firewire/fw-transaction.h | 1 |
3 files changed, 32 insertions, 10 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); |
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index abc37fa52492..8e2b94557390 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c | |||
@@ -720,23 +720,37 @@ MODULE_AUTHOR("Kristian Hoegsberg <krh@bitplanet.net>"); | |||
720 | MODULE_DESCRIPTION("Core IEEE1394 transaction logic"); | 720 | MODULE_DESCRIPTION("Core IEEE1394 transaction logic"); |
721 | MODULE_LICENSE("GPL"); | 721 | MODULE_LICENSE("GPL"); |
722 | 722 | ||
723 | static const u32 vendor_textual_descriptor_data[] = { | 723 | static const u32 vendor_textual_descriptor[] = { |
724 | /* textual descriptor leaf () */ | 724 | /* textual descriptor leaf () */ |
725 | 0x00080000, | 725 | 0x00060000, |
726 | 0x00000000, | 726 | 0x00000000, |
727 | 0x00000000, | 727 | 0x00000000, |
728 | 0x4c696e75, /* L i n u */ | 728 | 0x4c696e75, /* L i n u */ |
729 | 0x78204669, /* x F i */ | 729 | 0x78204669, /* x F i */ |
730 | 0x72657769, /* r e w i */ | 730 | 0x72657769, /* r e w i */ |
731 | 0x72652028, /* r e ( */ | 731 | 0x72650000, /* r e */ |
732 | 0x4a554a55, /* J U J U */ | ||
733 | 0x29000000, /* ) */ | ||
734 | }; | 732 | }; |
735 | 733 | ||
736 | static struct fw_descriptor vendor_textual_descriptor = { | 734 | static const u32 model_textual_descriptor[] = { |
737 | .length = ARRAY_SIZE(vendor_textual_descriptor_data), | 735 | /* model descriptor leaf () */ |
736 | 0x00030000, | ||
737 | 0x00000000, | ||
738 | 0x00000000, | ||
739 | 0x4a756a75, /* J u j u */ | ||
740 | }; | ||
741 | |||
742 | static struct fw_descriptor vendor_id_descriptor = { | ||
743 | .length = ARRAY_SIZE(vendor_textual_descriptor), | ||
744 | .immediate = 0x03d00d1e, | ||
738 | .key = 0x81000000, | 745 | .key = 0x81000000, |
739 | .data = vendor_textual_descriptor_data, | 746 | .data = vendor_textual_descriptor, |
747 | }; | ||
748 | |||
749 | static struct fw_descriptor model_id_descriptor = { | ||
750 | .length = ARRAY_SIZE(model_textual_descriptor), | ||
751 | .immediate = 0x17000001, | ||
752 | .key = 0x81000000, | ||
753 | .data = model_textual_descriptor, | ||
740 | }; | 754 | }; |
741 | 755 | ||
742 | static int __init fw_core_init(void) | 756 | static int __init fw_core_init(void) |
@@ -748,7 +762,9 @@ static int __init fw_core_init(void) | |||
748 | return retval; | 762 | return retval; |
749 | 763 | ||
750 | /* Add the vendor textual descriptor. */ | 764 | /* Add the vendor textual descriptor. */ |
751 | retval = fw_core_add_descriptor(&vendor_textual_descriptor); | 765 | retval = fw_core_add_descriptor(&vendor_id_descriptor); |
766 | BUG_ON(retval < 0); | ||
767 | retval = fw_core_add_descriptor(&model_id_descriptor); | ||
752 | BUG_ON(retval < 0); | 768 | BUG_ON(retval < 0); |
753 | 769 | ||
754 | return 0; | 770 | return 0; |
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index cbea845dc40a..552e9af081e9 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -164,6 +164,7 @@ struct fw_request; | |||
164 | struct fw_descriptor { | 164 | struct fw_descriptor { |
165 | struct list_head link; | 165 | struct list_head link; |
166 | size_t length; | 166 | size_t length; |
167 | u32 immediate; | ||
167 | u32 key; | 168 | u32 key; |
168 | const u32 *data; | 169 | const u32 *data; |
169 | }; | 170 | }; |