doc_write_page(9)
π¦ doc_write_page(9) π¦
okay so welcome to the Kernel API Manual, bestie π β this page is doc_write_page(9) and she is literally the βWrite a single page to the chipβ girlie. no cap.
π NAME π
doc_write_page β Write a single page to the chip. thatβs the whole assignment: one page, to the chip, slay.
β¨ SYNOPSIS β¨
int doc_write_page (struct docg3 *docg3 , loff_t to , const u_char *buf
, const u_char *oob , int autoecc );
πΈ ARGUMENTS πΈ
docg3β the device. sheβs the actual device weβre talking to.toβ the offset from first block and first page, in bytes, aligned on page size. like, do not freestyle the alignment, bestie.bufβ buffer to get bytes from. the data source.oobβ buffer to get out of band bytes from (can beNULLif no OOB should be written). yes,NULLis allowed when no OOB should be written.autoeccβ if0, all16bytes from OOB are taken, regardless of HW Hamming or BCH computations. If1, only bytes0-7and byte15are taken, remaining ones are filled with hardware Hamming and BCH computations. Its value is not meaningfull isoob == NULL(so ifoobisNULL, this value doesnβt matter).
π₯ DESCRIPTION π₯
this one writes one full page (ie. 1 page split on two planes), of 512 bytes, with the OOB data. the OOB ECC is automatically computed by the hardware Hamming and BCH generator if autoecc is not null.
returns:
0β write successful-EIOβ write error-EAGAINβ timeout
π SEE ALSO π
okay hereβs the whole friend group, no cap:
- Kernel file
./drivers/mtd/devices/docg3.c doc_delay(9)doc_read_data_area(9)doc_write_data_area(9)doc_set_reliable_mode(9)doc_set_asic_mode(9)doc_set_device_id(9)doc_set_extra_page_mode(9)doc_setup_addr_sector(9)doc_setup_writeaddr_sector(9)doc_read_seek(9)doc_write_seek(9)doc_read_page_ecc_init(9)doc_write_page_ecc_init(9)doc_ecc_disable(9)doc_hamming_ecc_init(9)doc_ecc_bch_fix_data(9)doc_read_page_prepare(9)doc_read_page_getbytes(9)doc_write_page_putbytes(9)doc_get_bch_hw_ecc(9)doc_page_finish(9)doc_read_page_finish(9)calc_block_sector(9)doc_read_oob(9)doc_block_isbad(9)doc_get_erase_count(9)doc_get_op_status(9)doc_write_erase_wait_status(9)doc_erase_block(9)doc_erase(9)doc_guess_autoecc(9)doc_fill_autooob(9)doc_backup_oob(9)doc_write_oob(9)doc_set_driver_info(9)doc_probe_device(9)doc_release_device(9)docg3_resume(9)docg3_suspend(9)docg3_probe(9)docg3_release(9)
source/version: ./drivers/mtd/devices Β· date: October 2026 Β· page: doc_write_page(9) β bye bestie, slay your writes πβ¨
π¦ 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