nand_get_data_buf(9)
π nand_get_data_buf(9) β the Kernel API Manual, bestie edition π
So this one is nand_get_data_buf from the Kernel API Manual, and honestly? It's a tiny little function with a big vibe. Let's get into it. β¨
β¨ NAME β¨
nand_get_data_buf β grab that internal page buffer, no cap π«Ά
πΈ SYNOPSIS πΈ
void * nand_get_data_buf (struct nand_chip *chip );
π¦ ARGUMENTS π¦
chipβ the NAND chip object. That's it, that's the whole argument. Main character energy, honestly. π
π DESCRIPTION π
Okay so here's the tea: this returns the pre-allocated page buffer, but only after invalidating the cache. Like, it hands you the buffer fresh and clean. π§Όβ¨
This one's for you if you're writing a driver that does not want to allocate its own bounce buffer but still needs one for specific operations β and the manual says that's most commonly the case when reading OOB data only. π
β οΈ Be careful to never call this function in thewrite/write_oobpath. Why? Because the core may have placed the data to be written out in this buffer, and if you go messing with it, that's giving chaos, not cute. π So like... respect the buffer. π
β RETURN β
A pointer to the page cache buffer. Slay. π
π SEE ALSO π
Kernel file ./include/linux/mtd/rawnand.h, plus this whole friend group right here π
struct nand_parameters(9)struct nand_id(9)struct nand_ecc_step_info(9)struct nand_ecc_caps(9)struct nand_ecc_ctrl(9)struct nand_sdr_timings(9)struct nand_nvddr_timings(9)enum nand_interface_type(9)struct nand_interface_config(9)nand_interface_is_sdr(9)nand_interface_is_nvddr(9)nand_get_sdr_timings(9)nand_get_nvddr_timings(9)struct nand_op_cmd_instr(9)struct nand_op_addr_instr(9)struct nand_op_data_instr(9)struct nand_op_waitrdy_instr(9)enum nand_op_instr_type(9)struct nand_op_instr(9)struct nand_subop(9)struct nand_op_parser_addr_constraints(9)struct nand_op_parser_data_constraints(9)struct nand_op_parser_pattern_elem(9)struct nand_op_parser_pattern(9)struct nand_op_parser(9)struct nand_operation(9)struct nand_controller_ops(9)struct nand_controller(9)struct nand_legacy(9)struct nand_chip_ops(9)struct nand_manufacturer(9)struct nand_secure_region(9)struct nand_chip(9)nand_get_interface_config(9)struct nand_flash_dev(9)nand_opcode_8bits(9)
and that's the whole page, bestie π This one lives over in ./include/linux/mtd, dated October 2026, and it's from the Kernel API Manual β nand_get_data_buf(9), literally iconic, no notes. π
β¨
π¦ 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