doc_probe_device(9)
π doc_probe_device(9) β like, the whole vibe check for a device β¨
okay so bestie, welcome to the Kernel API Manual entry for doc_probe_device π this one lives in section 9 (that's the kernel-functions girlies) and honestly? it's giving "small function, big feelings" π
πΈ NAME πΈ
doc_probe_device β check if a device is actually available, no cap π΅οΈββοΈ
β¨ SYNOPSIS β¨
struct mtd_info * doc_probe_device (struct docg3_cascade *cascade , int
floor , struct device *dev );
like literally that's the whole signature, she's not complicated π
π¦ ARGUMENTS π¦
cascadeβ the cascade of chips that this device (or these devices, plural energy π«Ά) is gonna belong tofloorβ the floor of the device we're probing, ikr, floors, in my kernel? more likely than you think πdevβ the device itself, the main character π
π DESCRIPTION π
So what does she do? She checks whether a device at the specified IO range β and at that floor β is available. Simple as that, periodt π
Here's the return-value tea β:
- you get a
mtd_infostruct back if there is a device β slay π - you get
ENODEVif none was found β not me getting rejected π - you get
ENOMEMif a memory allocation failed β tragic, but it happens π
β οΈ heads up bestie: if floor 0 is the one being checked, a reset of the ASIC gets launched. so like, know that before you poke it, fr fr π₯
π₯ SEE ALSO π₯
The kernel file to go read is ./drivers/mtd/devices/docg3.c β that's the mothership π and here's the whole friend group, no one gets left behind, iykyk:
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_write_page(9)doc_guess_autoecc(9)doc_fill_autooob(9)doc_backup_oob(9)doc_write_oob(9)doc_set_driver_info(9)doc_release_device(9)docg3_resume(9)docg3_suspend(9)docg3_probe(9)docg3_release(9)
and that's the whole page, bestie, you ate that π this lil beauty ships out of ./drivers/mtd/devices, dated October 2026, and she answers to the name doc_probe_device(9) πβ¨π«Ά
π¦ 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