nand_get_data_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the write/write_oob path. 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