STRUCT TB_NVM_VENDOR_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct tb_nvm_vendor_ops(9) β€” like, the Kernel API Manual bestie ✨

okay so real talk, this is the <pink>Kernel API Manual</pink> entry for struct tb_nvm_vendor_ops, and it's genuinely one of those little structs that's giving main character energy in the Thunderbolt NVM world πŸ¦‹


🌸 NAME 🌸

struct tb_nvm_vendor_ops β€” Vendor specific NVM operations πŸ’–

Like, it's literally the struct where a vendor plugs in its own custom NVM behaviour. no cap.


✨ SYNOPSIS ✨

struct tb_nvm_vendor_ops {
    int (*read_version)(struct tb_nvm *nvm);
    int (*validate)(struct tb_nvm *nvm);
    int (*write_headers)(struct tb_nvm *nvm);
 };

three function pointers, three vibes, one struct πŸŽ€ that's it that's the whole thing.


🫢 Members 🫢

  • read_version β€” reads out the NVM version from the flash πŸ”₯ like, it goes and fetches the version for you. iconic behaviour honestly.
  • validate β€” validates the NVM image before update. it's optional, so no pressure bestie πŸ’…
  • write_headers β€” writes the headers before the rest of the image. also optional 🌸 order matters here, headers first, then the rest, iykyk.
lowkey reminder: validate and write_headers are both marked optional, so a vendor doesn't have to fill them in. read_version has no such note. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/thunderbolt/nvm.c, plus the whole friend group:

fr fr go read them, they all ate πŸ’€β­


aaaand that's the page! 🧚 sign-off time: this lil beauty lives in ./drivers/thunderbolt, it's dated October 2026, and yes the title is still struct tb_nvm_vendor_ops(9) because we don't do rebrands here πŸ“πŸ’œ

πŸ“¦ where this page comes from