ata_pci_sff_init_one(9)
π ata_pci_sff_init_one π
okay bestie, so this is a page from the Kernel API Manual β yes, the actual kernel man pages, we're doing Big Girl Unix today β and it's all about ata_pci_sff_init_one. Which, iykyk, is a whole mouthful, but stick with me, it's actually so slay once you get it. π¦
β¨ NAME β¨
ata_pci_sff_init_one β initialize and register a PIO-only PCI IDE controller. That's the whole vibe. π
πΈ SYNOPSIS πΈ
int ata_pci_sff_init_one (struct pci_dev *pdev , const struct
ata_port_info * const *ppi , const struct scsi_host_template *sht , void
*host_priv , int hflag );
Like, five whole arguments, but we're gonna walk through each one, no cap. π«Ά
π ARGUMENTS π
pdevβ the controller you're initializing. Like, the actual thing you're bringing to life. main character energy fr.ppiβ an array ofport_info. Heads up bestie: it has to be enough for two ports. Two. Not one. Don't come in here with one, it's giving underprepared. πshtβ thescsi_host_templateto use when registering the host. The paperwork, essentially.host_privβ the host'sprivate_data. Secret little stash, very private, very demure. πhflagβ host flags. Flags for the host. We love a flag.
π DESCRIPTION π
So basically, this is a helper function, and the way that you use it is: you call it from your driver's xxx_init_one probe function. β¨
But only if β and this is the big condition, the vibe check of it all β the hardware uses traditional IDE taskfile registers and is PIO only. Both. Not one. Both.
ASSUMPTION: Nobody makes a single channel controller that appears solely as the secondary legacy port on PCI. That's the assumption. We're all just, like, agreeing to assume it. It's in the man page so it's canon. π
LOCKING: Inherited from the PCI layer. And it may sleep β so like, don't call it somewhere rude where sleeping isn't allowed. Respect the nap. π€
β RETURN β
Zeroon success β slay, it worked! π- a negative errno-based value on error β it's giving "something went wrong, check the errno." π
π SEE ALSO π
Kernel file ./drivers/ata/libata-sff.c, and honestly the whole squad is here, so let's do attendance. ππ
ata_sff_check_status(9)ata_sff_altstatus(9)ata_sff_irq_status(9)ata_sff_sync(9)ata_sff_pause(9)ata_sff_dma_pause(9)ata_sff_wait_ready(9)ata_sff_set_devctl(9)ata_sff_dev_select(9)ata_dev_select(9)ata_sff_irq_on(9)ata_sff_tf_load(9)ata_sff_tf_read(9)ata_sff_exec_command(9)ata_tf_to_host(9)ata_sff_data_xfer(9)ata_sff_data_xfer32(9)ata_pio_sector(9)ata_pio_sectors(9)atapi_send_cdb(9)__atapi_pio_bytes(9)atapi_pio_bytes(9)ata_hsm_ok_in_wq(9)ata_hsm_qc_complete(9)ata_sff_hsm_move(9)ata_sff_qc_issue(9)ata_sff_qc_fill_rtf(9)ata_sff_port_intr(9)ata_sff_interrupt(9)ata_sff_lost_interrupt(9)ata_sff_freeze(9)ata_sff_thaw(9)ata_sff_prereset(9)ata_devchk(9)ata_sff_dev_classify(9)ata_sff_wait_after_reset(9)ata_sff_softreset(9)sata_sff_hardreset(9)ata_sff_postreset(9)ata_sff_drain_fifo(9)ata_sff_error_handler(9)ata_sff_std_ports(9)ata_pci_sff_init_host(9)ata_pci_sff_prepare_host(9)ata_pci_sff_activate_host(9)ata_bmdma_fill_sg(9)ata_bmdma_fill_sg_dumb(9)ata_bmdma_qc_prep(9)ata_bmdma_dumb_qc_prep(9)ata_bmdma_qc_issue(9)ata_bmdma_port_intr(9)ata_bmdma_interrupt(9)ata_bmdma_error_handler(9)ata_bmdma_post_internal_cmd(9)ata_bmdma_irq_clear(9)ata_bmdma_setup(9)ata_bmdma_start(9)ata_bmdma_stop(9)ata_bmdma_status(9)ata_bmdma_port_start(9)ata_bmdma_port_start32(9)ata_pci_bmdma_clear_simplex(9)ata_pci_bmdma_init(9)ata_pci_bmdma_prepare_host(9)ata_pci_bmdma_init_one(9)ata_sff_port_init(9)
Like I said. The whole squad. Obsessed with the commitment honestly. π₯
okay that's the whole page bestie, you ate that π β¨
This one comes to you straight from ./drivers/ata, dated October 2026 β so like, mark your calendar, it's basically a time capsule ππ¦ β and that's a wrap, mwah π
π¦ 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