Lines Matching refs:desc

92 	struct fw_descriptor *desc;  in generate_config_rom()  local
122 list_for_each_entry (desc, &descriptor_list, link) { in generate_config_rom()
123 if (desc->immediate > 0) in generate_config_rom()
124 config_rom[i++] = cpu_to_be32(desc->immediate); in generate_config_rom()
125 config_rom[i] = cpu_to_be32(desc->key | (j - i)); in generate_config_rom()
127 j += desc->length; in generate_config_rom()
134 list_for_each_entry (desc, &descriptor_list, link) { in generate_config_rom()
135 for (k = 0; k < desc->length; k++) in generate_config_rom()
136 config_rom[i + k] = cpu_to_be32(desc->data[k]); in generate_config_rom()
137 i += desc->length; in generate_config_rom()
161 static size_t required_space(struct fw_descriptor *desc) in required_space() argument
164 return desc->length + 1 + (desc->immediate > 0 ? 1 : 0); in required_space()
167 int fw_core_add_descriptor(struct fw_descriptor *desc) in fw_core_add_descriptor() argument
178 while (i < desc->length) in fw_core_add_descriptor()
179 i += (desc->data[i] >> 16) + 1; in fw_core_add_descriptor()
181 if (i != desc->length) in fw_core_add_descriptor()
186 if (config_rom_length + required_space(desc) > 256) { in fw_core_add_descriptor()
189 list_add_tail(&desc->link, &descriptor_list); in fw_core_add_descriptor()
190 config_rom_length += required_space(desc); in fw_core_add_descriptor()
192 if (desc->immediate > 0) in fw_core_add_descriptor()
204 void fw_core_remove_descriptor(struct fw_descriptor *desc) in fw_core_remove_descriptor() argument
208 list_del(&desc->link); in fw_core_remove_descriptor()
209 config_rom_length -= required_space(desc); in fw_core_remove_descriptor()
211 if (desc->immediate > 0) in fw_core_remove_descriptor()