STRUCT NAND_OP_DATA_INSTR(9)
β¨ struct nand_op_data_instr(9) β¨
okay so bestie, welcome to the Kernel API Manual β this one's about struct nand_op_data_instr, which is literally the definition of a data instruction π
no cap.
π NAME π
struct nand_op_data_instr β Definition of a data instruction. that's it, that's the whole vibe β¨
π¦ SYNOPSIS π¦
struct nand_op_data_instr {
unsigned int len;
union {
void *in;
const void *out;
} buf;
bool force_8bit;
};
like, that's the whole struct. she's small but she's doing a LOT π«Ά
πΈ Members πΈ
lenβ the number of data bytes to move. how many bytes are we shifting around, bestie? that number. π¦bufβ buffer to fill. the actual destination situation.buf.inβ buffer to fill when reading from the NAND chip πbuf.outβ buffer to read from when writing to the NAND chip βοΈforce_8bitβ force 8-bit access. no widening, no funny business, just 8-bit, periodt π₯
π Description π
okay so this is the part where you have to pay attention because it's giving "trap" energy π
Please note that"in"and"out"are inverted from the ONFI specification and are from the controller perspective β so a"in"is a read from the NAND chip, while a"out"is a write to the NAND chip.
like... yes. i know. it feels backwards. that's the whole point. don't @ me, @ the ONFI spec π just remember: controller's POV, always. main character energy is the controller, not the chip. iykyk π
β SEE ALSO β
Kernel file ./include/linux/mtd/rawnand.h β and the whole friend group, fr fr:
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_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)nand_get_data_buf(9)
π and that's the page!! mwah π this lil manual page lives in ./include/linux/mtd, dated October 2026, and it's part of the Kernel API Manual β slay, ate, no crumbs πβ¨
π¦ 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