Lines Matching full:component

68  * ice_check_component_response - Report firmware response to a component
70 * @id: component id being checked
71 * @response: indicates whether this component can be updated
75 * Check whether firmware indicates if this component can be updated. Report
76 * a suitable error message over the netlink extended ACK if the component
79 * Returns: zero if the component can be updated, or -ECANCELED of the
80 * firmware indicates the component cannot be updated.
87 const char *component; in ice_check_component_response() local
91 component = "fw.undi"; in ice_check_component_response()
94 component = "fw.mgmt"; in ice_check_component_response()
97 component = "fw.netlist"; in ice_check_component_response()
100 WARN(1, "Unexpected unknown component identifier 0x%02x", id); in ice_check_component_response()
105 component, response, code); in ice_check_component_response()
112 …are recommends not updating %s, as it may result in a downgrade. continuing anyways\n", component); in ice_check_component_response()
115 dev_info(dev, "firmware has rejected updating %s\n", component); in ice_check_component_response()
121 dev_err(dev, "Component comparison stamp for %s is identical to the running image\n", in ice_check_component_response()
122 component); in ice_check_component_response()
123 NL_SET_ERR_MSG_MOD(extack, "Component comparison stamp is identical to running image"); in ice_check_component_response()
126 dev_err(dev, "Component comparison stamp for %s is lower than the running image\n", in ice_check_component_response()
127 component); in ice_check_component_response()
128 NL_SET_ERR_MSG_MOD(extack, "Component comparison stamp is lower than running image"); in ice_check_component_response()
131 dev_err(dev, "Component comparison stamp for %s is invalid\n", in ice_check_component_response()
132 component); in ice_check_component_response()
133 NL_SET_ERR_MSG_MOD(extack, "Component comparison stamp is invalid"); in ice_check_component_response()
136 dev_err(dev, "%s conflicts with a previous component table\n", in ice_check_component_response()
137 component); in ice_check_component_response()
138 NL_SET_ERR_MSG_MOD(extack, "Component table conflict occurred"); in ice_check_component_response()
141 dev_err(dev, "Pre-requisites for component %s have not been met\n", in ice_check_component_response()
142 component); in ice_check_component_response()
143 NL_SET_ERR_MSG_MOD(extack, "Component pre-requisites not met"); in ice_check_component_response()
146 dev_err(dev, "%s is not a supported component\n", in ice_check_component_response()
147 component); in ice_check_component_response()
148 NL_SET_ERR_MSG_MOD(extack, "Component not supported"); in ice_check_component_response()
152 component); in ice_check_component_response()
153 NL_SET_ERR_MSG_MOD(extack, "Component cannot be downgraded"); in ice_check_component_response()
156 dev_err(dev, "Received an incomplete component image for %s\n", in ice_check_component_response()
157 component); in ice_check_component_response()
158 NL_SET_ERR_MSG_MOD(extack, "Incomplete component image"); in ice_check_component_response()
161 dev_err(dev, "Component version for %s is identical to the running image\n", in ice_check_component_response()
162 component); in ice_check_component_response()
163 NL_SET_ERR_MSG_MOD(extack, "Component version is identical to running image"); in ice_check_component_response()
166 dev_err(dev, "Component version for %s is lower than the running image\n", in ice_check_component_response()
167 component); in ice_check_component_response()
168 NL_SET_ERR_MSG_MOD(extack, "Component version is lower than the running image"); in ice_check_component_response()
172 code, component); in ice_check_component_response()
181 * ice_send_component_table - Send PLDM component table to firmware
183 * @component: the component to process
184 * @transfer_flag: relative transfer order of this component
186 * Read relevant data from the component and forward it to the device
196 ice_send_component_table(struct pldmfw *context, struct pldmfw_component *component, in ice_send_component_table() argument
209 switch (component->identifier) { in ice_send_component_table()
215 dev_err(dev, "Unable to update due to a firmware component with unknown ID %u\n", in ice_send_component_table()
216 component->identifier); in ice_send_component_table()
217 NL_SET_ERR_MSG_MOD(extack, "Unable to update due to unknown firmware component"); in ice_send_component_table()
221 length = struct_size(comp_tbl, cvs, component->version_len); in ice_send_component_table()
226 comp_tbl->comp_class = cpu_to_le16(component->classification); in ice_send_component_table()
227 comp_tbl->comp_id = cpu_to_le16(component->identifier); in ice_send_component_table()
229 comp_tbl->comp_cmp_stamp = cpu_to_le32(component->comparison_stamp); in ice_send_component_table()
230 comp_tbl->cvs_type = component->version_type; in ice_send_component_table()
231 comp_tbl->cvs_len = component->version_len; in ice_send_component_table()
232 memcpy(comp_tbl->cvs, component->version_string, component->version_len); in ice_send_component_table()
234 dev_dbg(dev, "Sending component table to firmware:\n"); in ice_send_component_table()
243 dev_err(dev, "Failed to transfer component table to firmware, err %s aq_err %s\n", in ice_send_component_table()
246 NL_SET_ERR_MSG_MOD(extack, "Failed to transfer component table to firmware"); in ice_send_component_table()
250 return ice_check_component_response(pf, component->identifier, comp_response, in ice_send_component_table()
348 * @component: the name of the component being updated
362 ice_write_nvm_module(struct ice_pf *pf, u16 module, const char *component, in ice_write_nvm_module() argument
373 dev_dbg(dev, "Beginning write of flash component '%s', module 0x%02x\n", component, module); in ice_write_nvm_module()
378 component, 0, length); in ice_write_nvm_module()
404 component, offset, length); in ice_write_nvm_module()
407 dev_dbg(dev, "Completed write of flash component '%s', module 0x%02x\n", component, module); in ice_write_nvm_module()
411 component, length, length); in ice_write_nvm_module()
414 component, length, length); in ice_write_nvm_module()
424 * @component: name of the component being updated
435 ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component, in ice_erase_nvm_module() argument
446 dev_dbg(dev, "Beginning erase of flash component '%s', module 0x%02x\n", component, module); in ice_erase_nvm_module()
452 devlink_flash_update_status_notify(devlink, "Erasing", component, 0, 0); in ice_erase_nvm_module()
457 component, module, ice_stat_str(status), in ice_erase_nvm_module()
468 component, module, err); in ice_erase_nvm_module()
478 component, completion_module, module); in ice_erase_nvm_module()
486 component, module, in ice_erase_nvm_module()
493 dev_dbg(dev, "Completed erase of flash component '%s', module 0x%02x\n", component, module); in ice_erase_nvm_module()
498 component, 0, 0); in ice_erase_nvm_module()
501 component, 0, 0); in ice_erase_nvm_module()
559 * ice_flash_component - Flash a component of the NVM
561 * @component: the component table to program
563 * Program the flash contents for a given component. First, determine the
565 * the contents of the component to the NVM.
572 ice_flash_component(struct pldmfw *context, struct pldmfw_component *component) in ice_flash_component() argument
582 switch (component->identifier) { in ice_flash_component()
600 * sending the component table to firmware. in ice_flash_component()
602 WARN(1, "Unexpected unknown component identifier 0x%02x", in ice_flash_component()
603 component->identifier); in ice_flash_component()
607 /* Mark this component for activating at the end */ in ice_flash_component()
614 return ice_write_nvm_module(pf, module, name, component->component_data, in ice_flash_component()
615 component->component_size, extack); in ice_flash_component()
656 * Extract the device record Package Data and Component Tables and send them
710 * @component: if not NULL, the name of the component being updated
718 int ice_check_for_pending_update(struct ice_pf *pf, const char *component, in ice_check_for_pending_update() argument
746 dev_info(dev, "The fw.mgmt flash component has a pending update\n"); in ice_check_for_pending_update()
751 dev_info(dev, "The fw.undi flash component has a pending update\n"); in ice_check_for_pending_update()
756 dev_info(dev, "The fw.netlist flash component has a pending update\n"); in ice_check_for_pending_update()
762 /* If the flash_update request is for a specific component, ignore all in ice_check_for_pending_update()
765 if (component) { in ice_check_for_pending_update()
766 if (strcmp(component, "fw.mgmt") == 0) in ice_check_for_pending_update()
768 else if (strcmp(component, "fw.undi") == 0) in ice_check_for_pending_update()
770 else if (strcmp(component, "fw.netlist") == 0) in ice_check_for_pending_update()
773 WARN(1, "Unexpected flash component %s", component); in ice_check_for_pending_update()
785 component, 0, 0); in ice_check_for_pending_update()