Lines Matching full:component
80 * ice_check_component_response - Report firmware response to a component
82 * @id: component id being checked
83 * @response: indicates whether this component can be updated
87 * Check whether firmware indicates if this component can be updated. Report
88 * a suitable error message over the netlink extended ACK if the component
91 * Returns: zero if the component can be updated, or -ECANCELED of the
92 * firmware indicates the component cannot be updated.
99 const char *component; in ice_check_component_response() local
103 component = "fw.undi"; in ice_check_component_response()
106 component = "fw.mgmt"; in ice_check_component_response()
109 component = "fw.netlist"; in ice_check_component_response()
112 WARN(1, "Unexpected unknown component identifier 0x%02x", id); in ice_check_component_response()
117 component, response, code); in ice_check_component_response()
124 …are recommends not updating %s, as it may result in a downgrade. continuing anyways\n", component); in ice_check_component_response()
127 dev_info(dev, "firmware has rejected updating %s\n", component); in ice_check_component_response()
137 dev_err(dev, "Component comparison stamp for %s is identical to the running image\n", in ice_check_component_response()
138 component); in ice_check_component_response()
139 NL_SET_ERR_MSG_MOD(extack, "Component comparison stamp is identical to running image"); in ice_check_component_response()
142 dev_err(dev, "Component comparison stamp for %s is lower than the running image\n", in ice_check_component_response()
143 component); in ice_check_component_response()
144 NL_SET_ERR_MSG_MOD(extack, "Component comparison stamp is lower than running image"); in ice_check_component_response()
147 dev_err(dev, "Component comparison stamp for %s is invalid\n", in ice_check_component_response()
148 component); in ice_check_component_response()
149 NL_SET_ERR_MSG_MOD(extack, "Component comparison stamp is invalid"); in ice_check_component_response()
152 dev_err(dev, "%s conflicts with a previous component table\n", in ice_check_component_response()
153 component); in ice_check_component_response()
154 NL_SET_ERR_MSG_MOD(extack, "Component table conflict occurred"); in ice_check_component_response()
157 dev_err(dev, "Pre-requisites for component %s have not been met\n", in ice_check_component_response()
158 component); in ice_check_component_response()
159 NL_SET_ERR_MSG_MOD(extack, "Component pre-requisites not met"); in ice_check_component_response()
162 dev_err(dev, "%s is not a supported component\n", in ice_check_component_response()
163 component); in ice_check_component_response()
164 NL_SET_ERR_MSG_MOD(extack, "Component not supported"); in ice_check_component_response()
168 component); in ice_check_component_response()
169 NL_SET_ERR_MSG_MOD(extack, "Component cannot be downgraded"); in ice_check_component_response()
172 dev_err(dev, "Received an incomplete component image for %s\n", in ice_check_component_response()
173 component); in ice_check_component_response()
174 NL_SET_ERR_MSG_MOD(extack, "Incomplete component image"); in ice_check_component_response()
177 dev_err(dev, "Component version for %s is identical to the running image\n", in ice_check_component_response()
178 component); in ice_check_component_response()
179 NL_SET_ERR_MSG_MOD(extack, "Component version is identical to running image"); in ice_check_component_response()
182 dev_err(dev, "Component version for %s is lower than the running image\n", in ice_check_component_response()
183 component); in ice_check_component_response()
184 NL_SET_ERR_MSG_MOD(extack, "Component version is lower than the running image"); in ice_check_component_response()
188 code, component); in ice_check_component_response()
197 * ice_send_component_table - Send PLDM component table to firmware
199 * @component: the component to process
200 * @transfer_flag: relative transfer order of this component
202 * Read relevant data from the component and forward it to the device
212 ice_send_component_table(struct pldmfw *context, struct pldmfw_component *component, in ice_send_component_table() argument
225 switch (component->identifier) { in ice_send_component_table()
231 dev_err(dev, "Unable to update due to a firmware component with unknown ID %u\n", in ice_send_component_table()
232 component->identifier); in ice_send_component_table()
233 NL_SET_ERR_MSG_MOD(extack, "Unable to update due to unknown firmware component"); in ice_send_component_table()
237 length = struct_size(comp_tbl, cvs, component->version_len); in ice_send_component_table()
242 comp_tbl->comp_class = cpu_to_le16(component->classification); in ice_send_component_table()
243 comp_tbl->comp_id = cpu_to_le16(component->identifier); in ice_send_component_table()
245 comp_tbl->comp_cmp_stamp = cpu_to_le32(component->comparison_stamp); in ice_send_component_table()
246 comp_tbl->cvs_type = component->version_type; in ice_send_component_table()
247 comp_tbl->cvs_len = component->version_len; in ice_send_component_table()
248 memcpy(comp_tbl->cvs, component->version_string, component->version_len); in ice_send_component_table()
250 dev_dbg(dev, "Sending component table to firmware:\n"); in ice_send_component_table()
259 dev_err(dev, "Failed to transfer component table to firmware, err %d aq_err %s\n", in ice_send_component_table()
261 NL_SET_ERR_MSG_MOD(extack, "Failed to transfer component table to firmware"); in ice_send_component_table()
265 return ice_check_component_response(pf, component->identifier, comp_response, in ice_send_component_table()
391 * @component: the name of the component being updated
406 ice_write_nvm_module(struct ice_pf *pf, u16 module, const char *component, in ice_write_nvm_module() argument
417 dev_dbg(dev, "Beginning write of flash component '%s', module 0x%02x\n", component, module); in ice_write_nvm_module()
422 component, 0, length); in ice_write_nvm_module()
449 component, offset, length); in ice_write_nvm_module()
452 dev_dbg(dev, "Completed write of flash component '%s', module 0x%02x\n", component, module); in ice_write_nvm_module()
456 component, length, length); in ice_write_nvm_module()
459 component, length, length); in ice_write_nvm_module()
474 * @component: name of the component being updated
485 ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component, in ice_erase_nvm_module() argument
497 dev_dbg(dev, "Beginning erase of flash component '%s', module 0x%02x\n", component, module); in ice_erase_nvm_module()
501 devlink_flash_update_timeout_notify(devlink, "Erasing", component, ICE_FW_ERASE_TIMEOUT); in ice_erase_nvm_module()
508 component, module, err, in ice_erase_nvm_module()
518 component, module, err); in ice_erase_nvm_module()
530 component, completion_module, module); in ice_erase_nvm_module()
538 component, module, in ice_erase_nvm_module()
545 dev_dbg(dev, "Completed erase of flash component '%s', module 0x%02x\n", component, module); in ice_erase_nvm_module()
550 component, 0, 0); in ice_erase_nvm_module()
553 component, 0, 0); in ice_erase_nvm_module()
627 * ice_flash_component - Flash a component of the NVM
629 * @component: the component table to program
631 * Program the flash contents for a given component. First, determine the
633 * the contents of the component to the NVM.
640 ice_flash_component(struct pldmfw *context, struct pldmfw_component *component) in ice_flash_component() argument
651 switch (component->identifier) { in ice_flash_component()
672 * sending the component table to firmware. in ice_flash_component()
674 WARN(1, "Unexpected unknown component identifier 0x%02x", in ice_flash_component()
675 component->identifier); in ice_flash_component()
679 /* Mark this component for activating at the end */ in ice_flash_component()
686 return ice_write_nvm_module(pf, module, name, component->component_data, in ice_flash_component()
687 component->component_size, reset_level, in ice_flash_component()
847 * ice_get_pending_updates - Check if the component has a pending update
884 dev_info(dev, "The fw.mgmt flash component has a pending update\n"); in ice_get_pending_updates()
889 dev_info(dev, "The fw.undi flash component has a pending update\n"); in ice_get_pending_updates()
894 dev_info(dev, "The fw.netlist flash component has a pending update\n"); in ice_get_pending_updates()
904 * ice_cancel_pending_update - Cancel any pending update for a component
906 * @component: if not NULL, the name of the component being updated
909 * Cancel any pending update for the specified component. If component is
915 ice_cancel_pending_update(struct ice_pf *pf, const char *component, in ice_cancel_pending_update() argument
928 /* If the flash_update request is for a specific component, ignore all in ice_cancel_pending_update()
931 if (component) { in ice_cancel_pending_update()
932 if (strcmp(component, "fw.mgmt") == 0) in ice_cancel_pending_update()
934 else if (strcmp(component, "fw.undi") == 0) in ice_cancel_pending_update()
936 else if (strcmp(component, "fw.netlist") == 0) in ice_cancel_pending_update()
939 WARN(1, "Unexpected flash component %s", component); in ice_cancel_pending_update()
951 component, 0, 0); in ice_cancel_pending_update()
983 * Extract the device record Package Data and Component Tables and send them
1023 if (params->component && strcmp(params->component, "fw.mgmt") == 0) { in ice_devlink_flash_update()
1026 } else if (params->component) { in ice_devlink_flash_update()