Lines Matching defs:desc
82 struct fw_descriptor *desc;
112 list_for_each_entry (desc, &descriptor_list, link) {
113 if (desc->immediate > 0)
114 config_rom[i++] = cpu_to_be32(desc->immediate);
115 config_rom[i] = cpu_to_be32(desc->key | (j - i));
117 j += desc->length;
124 list_for_each_entry (desc, &descriptor_list, link) {
125 for (k = 0; k < desc->length; k++)
126 config_rom[i + k] = cpu_to_be32(desc->data[k]);
127 i += desc->length;
151 static size_t required_space(struct fw_descriptor *desc)
154 return desc->length + 1 + (desc->immediate > 0 ? 1 : 0);
157 int fw_core_add_descriptor(struct fw_descriptor *desc)
168 while (i < desc->length)
169 i += (desc->data[i] >> 16) + 1;
171 if (i != desc->length)
176 if (config_rom_length + required_space(desc) > 256) {
179 list_add_tail(&desc->link, &descriptor_list);
180 config_rom_length += required_space(desc);
182 if (desc->immediate > 0)
194 void fw_core_remove_descriptor(struct fw_descriptor *desc)
198 list_del(&desc->link);
199 config_rom_length -= required_space(desc);
201 if (desc->immediate > 0)