ice_write_nvm_module(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ice_write_nvm_module(9) β€” like, the actual kernel API manual, bestie πŸŽ€

okay so real quick β€” this page lives in the Kernel API Manual section 9, and it's all about ice_write_nvm_module, which is giving "I flash your network card's firmware" main character energy. let's get into it ✨


🌸 NAME 🌸

ice_write_nvm_module β€” write data to an NVM module. that's it, that's the whole vibe πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

int ice_write_nvm_module (struct ice_pf *pf , u16 module , const char
*component , const u8 *image , u32 length , u8 *reset_level , struct
netlink_ext_ack *extack );

✨ ARGUMENTS ✨

  • pf β€” the PF driver structure 🫢 that's your driver's whole personality right there
  • module β€” the module id to program, iykyk 🌈
  • component β€” the name of the component being updated. name it, bestie πŸ’…
  • image β€” buffer of image data to write to the NVM. this is the payload, the moment, the content πŸ”₯
  • length β€” length of the buffer. gotta know how much you're working with fr fr
  • reset_level β€” storage for reset level required. it's where the answer goes, not where it comes from πŸ™ˆ
  • extack β€” netlink extended ACK structure 🧚

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: this function loops over the data for a given NVM module and programs it in 4 Kb blocks. every single block, one at a time, no skipping 🎯

after each block is programmed, it notifies the devlink core of progress. like a little "we're at 40% bestie, keep streaming" update πŸ’Œ

it loops over a block of data and programs the NVM in 4k block chunks. yes, both 4 Kb and 4k appear in the original and yes we're keeping both, that's just how it is 😭

⚠️ lowkey important: note this function assumes the caller has acquired the NVM resource. that's on you, not on this function. no cap, if you didn't grab it first, that's a you problem πŸ’€

πŸ‘‘ RETURN πŸ‘‘

zero on success, or a negative error code on failure. that's the whole range, no in-between ✨

⭐ SEE ALSO ⭐

Kernel file ./drivers/net/ethernet/intel/ice/ice_fw_update.c


okay that's the page!! πŸ“ this whole thing comes from ./drivers/net/ethernet/intel/ice and the date on it is October 2026 β€” so yeah, from the future, slay πŸ¦‹πŸ’« go flash something responsibly, mwah πŸ’–πŸŒΈ

πŸ“¦ where this page comes from