File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,17 @@ struct pldmfw_ops;
125
125
* a pointer to their own data, used to implement the device specific
126
126
* operations.
127
127
*/
128
+
129
+ enum pldmfw_update_mode {
130
+ PLDMFW_UPDATE_MODE_FULL ,
131
+ PLDMFW_UPDATE_MODE_SINGLE_COMPONENT ,
132
+ };
133
+
128
134
struct pldmfw {
129
135
const struct pldmfw_ops * ops ;
130
136
struct device * dev ;
137
+ u16 component_identifier ;
138
+ enum pldmfw_update_mode mode ;
131
139
};
132
140
133
141
bool pldmfw_op_pci_match_record (struct pldmfw * context , struct pldmfw_record * record );
Original file line number Diff line number Diff line change @@ -481,9 +481,17 @@ static int pldm_parse_components(struct pldmfw_priv *data)
481
481
component -> component_data = data -> fw -> data + offset ;
482
482
component -> component_size = size ;
483
483
484
+ if (data -> context -> mode == PLDMFW_UPDATE_MODE_SINGLE_COMPONENT &&
485
+ data -> context -> component_identifier != component -> identifier )
486
+ continue ;
487
+
484
488
list_add_tail (& component -> entry , & data -> components );
485
489
}
486
490
491
+ if (data -> context -> mode == PLDMFW_UPDATE_MODE_SINGLE_COMPONENT &&
492
+ list_empty (& data -> components ))
493
+ return - ENOENT ;
494
+
487
495
header_crc_ptr = data -> fw -> data + data -> offset ;
488
496
489
497
err = pldm_move_fw_offset (data , sizeof (data -> header_crc ));
You can’t perform that action at this time.
0 commit comments