scan_read_oob(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ scan_read_oob(9) β€” the Kernel API Manual, bestie edition ✨

okay so like… welcome to the scan_read_oob page from the Kernel API Manual πŸ’–. this one's a lil niche but lowkey iconic if you're deep in NAND land. let's go πŸŽ€


🌸 NAME 🌸

scan_read_oob β€” literally just [GENERIC] Scan data+OOB region to buffer πŸ’…

that bracket-y [GENERIC] tag? yeah it's part of the name, keep it, it's giving label energy ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

int scan_read_oob (struct nand_chip *this , uint8_t *buf , loff_t offs ,
size_t len );

that's the whole flex. returns an int, takes four things, no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

okay bestie let's meet the cast πŸ’–

  • this β€” the NAND chip object. yes it's literally called this. main character energy honestly πŸ‘‘
  • buf β€” a temporary buffer. it's not forever, it's just for now πŸ™ˆ
  • offs β€” the offset at which to scan πŸ“
  • len β€” length of the data region to read πŸ“

πŸ’œ DESCRIPTION πŸ’œ

so what does it actually do? it does a scan read of data out of data+OOB. πŸ“

and here's the cute part: it may traverse multiple pages, interleaving page,OOB,page,OOB,... in buf. like it's literally layering them in there, alternating, one after another, iykyk ✨

it completes the transfer and returns the "strongest" ECC condition β€” that's either an error or a bitflip, whichever's the most dramatic πŸ’€

⚠️ heads up: it may quit on the first (non-ECC) error. so like, it's not gonna sit there and power through everything, it bails early fr fr 😭

🌈 SEE ALSO 🌈

all the sibling functions live in the kernel file ./drivers/mtd/nand/raw/nand_bbt.c β€” go say hi to the whole friend group 🫢


and that's the page, bestie 🧚✨ this one ships from ./drivers/mtd/nand/raw and it's dated October 2026 β€” so yeah, timestamped and slaying πŸ’…πŸ’– periodt 🌸

πŸ“¦ where this page comes from