STRUCT NAND_ECC_ENGINE(9)
π struct nand_ecc_engine(9)
okay so this is a page from the Kernel API Manual, bestie β and we're talking about struct nand_ecc_engine, aka the ECC engine abstraction for NAND devices. yes it's giving "low-level kernel struct" energy and honestly? iconic. let's get into it π«Ά
β¨ NAME β¨
struct nand_ecc_engine β the ECC engine abstraction for NAND devices, fr fr. it's the vibe layer that lets NAND code talk to whatever ECC engine is doing the heavy lifting π
πΈ SYNOPSIS πΈ
here's the whole struct, exactly as it lives, no cap:
struct nand_ecc_engine {
struct device *dev;
struct list_head node;
const struct nand_ecc_engine_ops *ops;
enum nand_ecc_engine_integration integration;
void *priv;
};
like... five fields. five. main character fields only π
π Members π
okay so let's meet the cast, one by one:
devβ the host device. it's the home base, the origin story, the "who do you belong to" of it all πnodeβ a private field for registration time. it's not for you, it's for the registration machinery. mind your business, bestie πopsβ the ECC engine operations. this is where the actual do-the-thing function pointers live. the whole engine's personality is in here π₯integrationβ how the engine is integrated with the host. and listen, important caveat: this is only relevant onNAND_ECC_ENGINE_TYPE_ON_HOSTengines. so if you're not on-host, this field is lowkey just vibing, not pulling weight πprivβ private data. the engine's personal little stash. driver-specific, don't touch β¨
π¦ SEE ALSO π¦
so much family here, it's a whole reunion. first, the kernel file: ./include/linux/mtd/nand.h β that's where this struct calls home π
and then the extended fam:
struct nand_memory_organization(9)struct nand_row_converter(9)struct nand_pos(9)enum nand_page_io_req_type(9)struct nand_page_io_req(9)enum nand_ecc_engine_type(9)enum nand_ecc_placement(9)enum nand_ecc_algo(9)struct nand_ecc_props(9)struct nand_bbt(9)struct nand_ops(9)struct nand_ecc_context(9)struct nand_ecc_engine_ops(9)enum nand_ecc_engine_integration(9)struct nand_ecc_req_tweak_ctx(9)struct nand_ecc(9)struct nand_device(9)struct nand_io_iter(9)mtd_to_nanddev(9)nanddev_to_mtd(9)nanddev_page_size(9)nanddev_per_page_oobsize(9)nanddev_pages_per_eraseblock(9)nanddev_pages_per_target(9)nanddev_eraseblocks_per_lun(9)nanddev_eraseblocks_per_target(9)nanddev_target_size(9)nanddev_neraseblocks(9)nanddev_size(9)nanddev_get_memorg(9)nanddev_get_ecc_conf(9)nanddev_get_ecc_nsteps(9)nanddev_get_ecc_bytes_per_step(9)nanddev_get_ecc_requirements(9)nanddev_set_ecc_requirements(9)nanddev_register(9)nanddev_unregister(9)nanddev_set_of_node(9)nanddev_get_of_node(9)nanddev_offs_to_pos(9)nanddev_pos_cmp(9)nanddev_pos_to_offs(9)nanddev_pos_to_row(9)nanddev_pos_next_target(9)nanddev_pos_next_lun(9)nanddev_pos_next_eraseblock(9)nanddev_pos_next_page(9)nanddev_bbt_pos_to_entry(9)nanddev_bbt_is_initialized(9)
like, that's the entire friend group. go read them, iykyk π
and that's the page, bestie! π source spot is ./include/linux/mtd, dated October 2026, and it'll forever be signed struct nand_ecc_engine(9). slay, go write some NAND drivers π
β¨
π¦ 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