STRUCT TB_NVM_VENDOR_OPS(9)
π 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:validateandwrite_headersare both marked optional, so a vendor doesn't have to fill them in.read_versionhas no such note. π
π SEE ALSO π
kernel file ./drivers/thunderbolt/nvm.c, plus the whole friend group:
struct tb_nvm_vendor(9)tb_nvm_alloc(9)tb_nvm_read_version(9)tb_nvm_validate(9)tb_nvm_write_headers(9)tb_nvm_add_active(9)tb_nvm_write_buf(9)tb_nvm_add_non_active(9)tb_nvm_free(9)tb_nvm_read_data(9)tb_nvm_write_data(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms