Lines Matching full:component

79  * ice_check_component_response - Report firmware response to a component
81 * @id: component id being checked
82 * @response: indicates whether this component can be updated
86 * Check whether firmware indicates if this component can be updated. Report
87 * a suitable error message over the netlink extended ACK if the component
90 * Returns: zero if the component can be updated, or -ECANCELED of the
91 * firmware indicates the component cannot be updated.
98 const char *component; in ice_check_component_response() local
102 component = "fw.undi"; in ice_check_component_response()
105 component = "fw.mgmt"; in ice_check_component_response()
108 component = "fw.netlist"; in ice_check_component_response()
111 WARN(1, "Unexpected unknown component identifier 0x%02x", id); in ice_check_component_response()
116 component, response, code); in ice_check_component_response()
123 …are recommends not updating %s, as it may result in a downgrade. continuing anyways\n", component); in ice_check_component_response()
126 dev_info(dev, "firmware has rejected updating %s\n", component); in ice_check_component_response()
132 dev_err(dev, "Component comparison stamp for %s is identical to the running image\n", in ice_check_component_response()
133 component); in ice_check_component_response()
134 NL_SET_ERR_MSG_MOD(extack, "Component comparison stamp is identical to running image"); in ice_check_component_response()
137 dev_err(dev, "Component comparison stamp for %s is lower than 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 lower than running image"); in ice_check_component_response()
142 dev_err(dev, "Component comparison stamp for %s is invalid\n", in ice_check_component_response()
143 component); in ice_check_component_response()
144 NL_SET_ERR_MSG_MOD(extack, "Component comparison stamp is invalid"); in ice_check_component_response()
147 dev_err(dev, "%s conflicts with a previous component table\n", in ice_check_component_response()
148 component); in ice_check_component_response()
149 NL_SET_ERR_MSG_MOD(extack, "Component table conflict occurred"); in ice_check_component_response()
152 dev_err(dev, "Pre-requisites for component %s have not been met\n", in ice_check_component_response()
153 component); in ice_check_component_response()
154 NL_SET_ERR_MSG_MOD(extack, "Component pre-requisites not met"); in ice_check_component_response()
157 dev_err(dev, "%s is not a supported component\n", in ice_check_component_response()
158 component); in ice_check_component_response()
159 NL_SET_ERR_MSG_MOD(extack, "Component not supported"); in ice_check_component_response()
163 component); in ice_check_component_response()
164 NL_SET_ERR_MSG_MOD(extack, "Component cannot be downgraded"); in ice_check_component_response()
167 dev_err(dev, "Received an incomplete component image for %s\n", in ice_check_component_response()
168 component); in ice_check_component_response()
169 NL_SET_ERR_MSG_MOD(extack, "Incomplete component image"); in ice_check_component_response()
172 dev_err(dev, "Component version for %s is identical to the running image\n", in ice_check_component_response()
173 component); in ice_check_component_response()
174 NL_SET_ERR_MSG_MOD(extack, "Component version is identical to running image"); in ice_check_component_response()
177 dev_err(dev, "Component version for %s is lower than 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 lower than the running image"); in ice_check_component_response()
183 code, component); in ice_check_component_response()
192 * ice_send_component_table - Send PLDM component table to firmware
194 * @component: the component to process
195 * @transfer_flag: relative transfer order of this component
197 * Read relevant data from the component and forward it to the device
207 ice_send_component_table(struct pldmfw *context, struct pldmfw_component *component, in ice_send_component_table() argument
220 switch (component->identifier) { in ice_send_component_table()
226 dev_err(dev, "Unable to update due to a firmware component with unknown ID %u\n", in ice_send_component_table()
227 component->identifier); in ice_send_component_table()
228 NL_SET_ERR_MSG_MOD(extack, "Unable to update due to unknown firmware component"); in ice_send_component_table()
232 length = struct_size(comp_tbl, cvs, component->version_len); in ice_send_component_table()
237 comp_tbl->comp_class = cpu_to_le16(component->classification); in ice_send_component_table()
238 comp_tbl->comp_id = cpu_to_le16(component->identifier); in ice_send_component_table()
240 comp_tbl->comp_cmp_stamp = cpu_to_le32(component->comparison_stamp); in ice_send_component_table()
241 comp_tbl->cvs_type = component->version_type; in ice_send_component_table()
242 comp_tbl->cvs_len = component->version_len; in ice_send_component_table()
243 memcpy(comp_tbl->cvs, component->version_string, component->version_len); in ice_send_component_table()
245 dev_dbg(dev, "Sending component table to firmware:\n"); in ice_send_component_table()
254 dev_err(dev, "Failed to transfer component table to firmware, err %d aq_err %s\n", in ice_send_component_table()
256 NL_SET_ERR_MSG_MOD(extack, "Failed to transfer component table to firmware"); in ice_send_component_table()
260 return ice_check_component_response(pf, component->identifier, comp_response, in ice_send_component_table()
384 * @component: the name of the component being updated
399 ice_write_nvm_module(struct ice_pf *pf, u16 module, const char *component, in ice_write_nvm_module() argument
410 dev_dbg(dev, "Beginning write of flash component '%s', module 0x%02x\n", component, module); in ice_write_nvm_module()
415 component, 0, length); in ice_write_nvm_module()
442 component, offset, length); in ice_write_nvm_module()
445 dev_dbg(dev, "Completed write of flash component '%s', module 0x%02x\n", component, module); in ice_write_nvm_module()
449 component, length, length); in ice_write_nvm_module()
452 component, length, length); in ice_write_nvm_module()
467 * @component: name of the component being updated
478 ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component, in ice_erase_nvm_module() argument
489 dev_dbg(dev, "Beginning erase of flash component '%s', module 0x%02x\n", component, module); in ice_erase_nvm_module()
493 devlink_flash_update_timeout_notify(devlink, "Erasing", component, ICE_FW_ERASE_TIMEOUT); in ice_erase_nvm_module()
500 component, module, err, in ice_erase_nvm_module()
510 component, module, err); in ice_erase_nvm_module()
521 component, completion_module, module); in ice_erase_nvm_module()
529 component, module, in ice_erase_nvm_module()
536 dev_dbg(dev, "Completed erase of flash component '%s', module 0x%02x\n", component, module); in ice_erase_nvm_module()
541 component, 0, 0); in ice_erase_nvm_module()
544 component, 0, 0); in ice_erase_nvm_module()
618 * ice_flash_component - Flash a component of the NVM
620 * @component: the component table to program
622 * Program the flash contents for a given component. First, determine the
624 * the contents of the component to the NVM.
631 ice_flash_component(struct pldmfw *context, struct pldmfw_component *component) in ice_flash_component() argument
642 switch (component->identifier) { in ice_flash_component()
663 * sending the component table to firmware. in ice_flash_component()
665 WARN(1, "Unexpected unknown component identifier 0x%02x", in ice_flash_component()
666 component->identifier); in ice_flash_component()
670 /* Mark this component for activating at the end */ in ice_flash_component()
677 return ice_write_nvm_module(pf, module, name, component->component_data, in ice_flash_component()
678 component->component_size, reset_level, in ice_flash_component()
838 * ice_get_pending_updates - Check if the component has a pending update
875 dev_info(dev, "The fw.mgmt flash component has a pending update\n"); in ice_get_pending_updates()
880 dev_info(dev, "The fw.undi flash component has a pending update\n"); in ice_get_pending_updates()
885 dev_info(dev, "The fw.netlist flash component has a pending update\n"); in ice_get_pending_updates()
895 * ice_cancel_pending_update - Cancel any pending update for a component
897 * @component: if not NULL, the name of the component being updated
900 * Cancel any pending update for the specified component. If component is
906 ice_cancel_pending_update(struct ice_pf *pf, const char *component, in ice_cancel_pending_update() argument
919 /* If the flash_update request is for a specific component, ignore all in ice_cancel_pending_update()
922 if (component) { in ice_cancel_pending_update()
923 if (strcmp(component, "fw.mgmt") == 0) in ice_cancel_pending_update()
925 else if (strcmp(component, "fw.undi") == 0) in ice_cancel_pending_update()
927 else if (strcmp(component, "fw.netlist") == 0) in ice_cancel_pending_update()
930 WARN(1, "Unexpected flash component %s", component); in ice_cancel_pending_update()
942 component, 0, 0); in ice_cancel_pending_update()
974 * Extract the device record Package Data and Component Tables and send them