Lines Matching defs:module

272  * @module: the module to write to
280 * Write a block of data to a flash module, and await for the completion
294 int ice_write_one_nvm_block(struct ice_pf *pf, u16 module, u32 offset,
307 dev_dbg(dev, "Writing block of %u bytes for module 0x%02x at offset %u\n",
308 block_size, module, offset);
312 err = ice_aq_update_nvm(hw, module, offset, block_size, block,
315 dev_err(dev, "Failed to flash module 0x%02x with block of size %u at offset %u, err %d aq_err %s\n",
316 module, block_size, offset, err,
318 NL_SET_ERR_MSG_MOD(extack, "Failed to program flash module");
330 dev_err(dev, "Timed out while trying to flash module 0x%02x with block of size %u at offset %u, err %d\n",
331 module, block_size, offset, err);
344 if (completion_module != module) {
346 completion_module, module);
359 dev_err(dev, "Firmware failed to flash module 0x%02x with block of size %u at offset %u, err %s\n",
360 module, block_size, offset,
362 NL_SET_ERR_MSG_MOD(extack, "Firmware failed to program flash module");
372 if (reset_level && last_cmd && module == ICE_SR_1ST_NVM_BANK_PTR) {
388 * ice_write_nvm_module - Write data to an NVM module
390 * @module: the module id to program
397 * Loop over the data for a given NVM module and program it in 4 Kb
406 ice_write_nvm_module(struct ice_pf *pf, u16 module, const char *component,
417 dev_dbg(dev, "Beginning write of flash component '%s', module 0x%02x\n", component, module);
440 err = ice_write_one_nvm_block(pf, module, offset, block_size,
452 dev_dbg(dev, "Completed write of flash component '%s', module 0x%02x\n", component, module);
465 /* Length in seconds to wait before timing out when erasing a flash module.
471 * ice_erase_nvm_module - Erase an NVM module and await firmware completion
473 * @module: the module to erase
477 * Erase the inactive NVM bank associated with this module, and await for
485 ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component,
497 dev_dbg(dev, "Beginning erase of flash component '%s', module 0x%02x\n", component, module);
505 err = ice_aq_erase_nvm(hw, module, NULL);
507 dev_err(dev, "Failed to erase %s (module 0x%02x), err %d aq_err %s\n",
508 component, module, err,
510 NL_SET_ERR_MSG_MOD(extack, "Failed to erase flash module");
517 dev_err(dev, "Timed out waiting for firmware to respond with erase completion for %s (module 0x%02x), err %d\n",
518 component, module, err);
528 if (completion_module != module) {
530 component, completion_module, module);
537 dev_err(dev, "Firmware failed to erase %s (module 0x%02x), aq_err %s\n",
538 component, module,
545 dev_dbg(dev, "Completed erase of flash component '%s', module 0x%02x\n", component, module);
632 * module id. Then, erase the secondary bank for this module. Finally, write
647 u16 module;
653 module = ICE_SR_1ST_OROM_BANK_PTR;
659 module = ICE_SR_1ST_NVM_BANK_PTR;
665 module = ICE_SR_NETLIST_BANK_PTR;
682 err = ice_erase_nvm_module(pf, module, name, extack);
686 return ice_write_nvm_module(pf, module, name, component->component_data,