ENUM NAND_ECC_PLACEMENT(9)
π enum nand_ecc_placement β a Kernel API Manual moment
okay so bestie, welcome to the Kernel API Manual β¨ this one's a little enum, and honestly? her whole job is just telling you where the ECC bytes live on your NAND. that's it. that's the gig. but it's kind of iconic because you literally cannot place your ECC without her, so let's get into it π
πΈ NAME πΈ
enum nand_ecc_placement β the NAND ECC bytes placement. yes queen, she's the one who knows where the spare bytes are hiding π
β¨ SYNOPSIS β¨
enum nand_ecc_placement {
NAND_ECC_PLACEMENT_UNKNOWN ,
NAND_ECC_PLACEMENT_OOB ,
NAND_ECC_PLACEMENT_INTERLEAVED
};
three constants, no cap. look at her go π«Ά
π¦ CONSTANTS π¦
NAND_ECC_PLACEMENT_UNKNOWNβ ngl we literally do not know where the ECC bytes are. the actual position is unknown. it's giving mystery, it's giving "ask your driver" πNAND_ECC_PLACEMENT_OOBβ slay, we found them! the ECC bytes are chilling in the OOB area πNAND_ECC_PLACEMENT_INTERLEAVEDβ the syndrome layout bestie π there are ECC bytes interleaved with the regular data, right there in the main area. main character energy, honestly π₯
π SEE ALSO π
okay this is the whole friend group, and yes I'm listing every single one of them because nobody gets left behind π
the kernel file lives at ./include/linux/mtd/nand.h, and the structs/enums/functions in question are:
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_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_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)
go read them, iykyk π
ok that's the whole page bestie, no gatekeeping here π§
and finally, the cute little sign-off: this one comes from ./include/linux/mtd and it's dated October 2026 β so she's a Libra (probably) and she's serving enum nand_ecc_placement(9) realness β bye pookie, go place some ECC bytes ππ
π¦ 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