ata_pci_sff_prepare_host(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ata_pci_sff_prepare_host(9) β€” the Kernel API Manual glow-up ✨

okay so bestie, welcome to the <pink>Kernel API Manual</pink> page for ata_pci_sff_prepare_host(9) β€” yes that whole mouthful is the name, we're not shortening it, it's iconic and we respect it πŸŽ€. This is the lowkey hero function that gets your PCI PIO-only SFF ATA host set up in one single swoop, no cap.


✨ NAME ✨

ata_pci_sff_prepare_host β€” the little helper that gets a PCI PIO-only SFF ATA host all prepped and ready 🫢


🌸 SYNOPSIS 🌸

int ata_pci_sff_prepare_host (struct pci_dev *pdev , const struct
       ata_port_info * const *ppi , struct ata_host **r_host );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pdev β€” the target PCI device πŸ’³ like, this is the device we're doing all this for
  • ppi β€” an array of port_info; it must be enough for two ports (yes, two β€” don't skimp, it's giving greedy girl energy πŸ™ˆ)
  • r_host β€” the out argument where the initialized ATA host lands once we're done ✨

πŸ’– DESCRIPTION πŸ’–

So what does it actually do? It's a helper that allocates a PIO-only SFF ATA host for pdev, acquires all the PCI resources, and initializes it accordingly β€” all in one go πŸ”₯ literally one call, she's efficient like that, main character energy fr fr.

LOCKING: Inherited from calling layer (may sleep) 😴 β€” so yeah, this one can sleep, keep that in mind, iykyk.

⭐ RETURN ⭐

  • 0 on success β€” slay πŸŽ‰
  • -errno otherwise β€” not slay, but at least you know 😭

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/ata/libata-sff.c, plus this whole friend group right here 🫢:

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_activate_host(9), ata_pci_sff_init_one(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)


and that's the whole page, bestie πŸ’œ shoutout to the source dir ./drivers/ata, dated October 2026, living under the ata_pci_sff_prepare_host(9) banner β€” mwah, iconic, periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from