sch_init_one(9)
π sch_init_one(9) β like, the Kernel API Manual page bestie π
okay so picture this: it's the Kernel API Manual, and today's main character is sch_init_one. yes she's a 9th-section kernel function, yes she's iconic, and yes I'm gonna walk you through her whole vibe. periodt. β¨
πΈ NAME πΈ
sch_init_one β registers an SCH ATA PCI device with kernel services π like she's checking her device into the coolest club in town and the bouncer is the kernel itself.
π¦ SYNOPSIS π¦
int sch_init_one (struct pci_dev *pdev , const struct pci_device_id *ent
);
she takes two args and hands you back an int, no cap π
π ARGUMENTS π
pdevβ the PCI device that's about to get registered π«Ά this is the one walking the red carpet.entβ the entry insch_pci_tblthat matches withpdevπ literally the plus-one that provespdevbelongs on the list.
π₯ DESCRIPTION π₯
okay so the important thing here, the thing you cannot skip, is:
LOCKING: inherited from the PCI layer β and that means she may sleep π΄π not me warning you, but like, she may sleep, so act accordingly bestie. it's giving "handle me with care" energy fr fr.
β¨ RETURN β¨
- Zero on success π slay, everything worked.
- or an
-ERRNOvalue π which is the "something went sideways" era. negative errno, classic.
π SEE ALSO π
- Kernel file
./drivers/ata/pata_sch.cβ go read the source, iykyk π sch_set_piomode(9)πsch_set_dmamode(9)π§
π‘ friendly reminder:sch_set_piomode(9)andsch_set_dmamode(9)are her sisters and they're all serving in the same family. go say hi.
okay that's the whole page bestie, you ate that π and one last thing β this little beauty lives in ./drivers/ata, dated October 2026, so if anyone asks where you found her, that's the receipt πβ¨π
π¦ 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