STRUCT NAND_ECC_ENGINE_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct nand_ecc_engine_ops(9) β€” like, the ECC engine operations bestie ✨

okay so this is a page from the Kernel API Manual, and it's about struct nand_ecc_engine_ops β€” the little vtable of function pointers that tells your ECC engine how to do its thing. yes it's as iconic as it sounds πŸŽ€


✨ NAME ✨

struct nand_ecc_engine_ops β€” ECC engine operations. that's it, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

struct nand_ecc_engine_ops {
    int (*init_ctx)(struct nand_device *nand);
    void (*cleanup_ctx)(struct nand_device *nand);
    int (*prepare_io_req)(struct nand_device *nand, struct
nand_page_io_req *req);
    int (*finish_io_req)(struct nand_device *nand, struct
nand_page_io_req *req);
 };

look at her. four function pointers. main character energy, no cap πŸ‘‘


🧚 Members 🧚

  • init_ctx β€” give it a nand_device that already has the user's desired config on it, and this asks the ECC engine driver to set up a configuration using values it actually supports. it's giving "negotiation, but make it firmware" 🀝
  • cleanup_ctx β€” cleans up the context that init_ctx initialized. yes queen, tidy up after yourself πŸ’…
  • prepare_io_req β€” gets called before reading/writing a page, so the I/O request can be prepped to go out with ECC correction. pre-game ritual, basically πŸŽ€
  • finish_io_req β€” gets called after reading/writing a page, to terminate the I/O request and make sure the ECC correction is proper. the post-game debrief, but make it error-checked 😭

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr β€” kernel file ./include/linux/mtd/nand.h, plus these icons:

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), enum nand_ecc_engine_integration(9), struct nand_ecc_engine(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 literally the entire mtd extended universe, iykyk 🌈


lowkey the coolest part? all of this lives in ./include/linux/mtd. go read it bestie, it ate πŸ’œ

okay that's the page!! πŸ’– this was the Kernel API Manual entry for struct nand_ecc_engine_ops(9), sourced from ./include/linux/mtd, dated October 2026 β€” mwah, slay, periodt, go fix your ECC 🫢⭐

πŸ“¦ where this page comes from