ata_qc_complete_multiple(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ata_qc_complete_multiple β€” the Kernel API Manual moment (section 9, iykyk)

okay so bestie, we're in the ata_qc_complete_multiple(9) page, technically a kernel API manual entry, and honestly? it's giving "small function, huge responsibility" ✨


🌸 NAME 🌸

ata_qc_complete_multiple β€” Complete multiple qcs successfully πŸŽ€

✨ SYNOPSIS ✨

int ata_qc_complete_multiple (struct ata_port *ap , u64 qc_active );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ap β€” the port in question, aka the main character here 🫢
  • qc_active β€” the new qc_active mask, fresh out of the oven πŸ’–

πŸ’… DESCRIPTION πŸ’…

so this one completes in-flight commands. literally its whole job. This functions is meant to be called from the low-level driver's interrupt routine to complete requests normally β€” that's the vibe, that's the assignment ✨

ap->qc_active and qc_active get compared, and commands are completed accordingly. no cap, that's just how it goes πŸ”₯

Always use this function when completing multiple NCQ commands from IRQ handlers instead of calling ata_qc_complete multiple times β€” the whole point is to keep IRQ expect status properly in sync. fr fr, don't skip this part πŸ™ˆ

LOCKING: spin_lock_irqsave(host lock) 🌈 like, respect the lock bestie, it's not optional

⭐ RETURN ⭐

Number of completed commands on success, -errno otherwise. slay, numbers πŸ’€

🧚 SEE ALSO 🧚

Kernel file ./drivers/ata/libata-sata.c, and honestly the whole friend group showed up:

ata_qc_complete_multiple's little siblings: sata_scr_valid(9), sata_scr_read(9), sata_scr_write(9), sata_scr_write_flush(9), ata_tf_to_fis(9), ata_tf_from_fis(9), sata_link_debounce(9), sata_link_resume(9), sata_link_scr_lpm(9), sata_set_spd_needed(9), sata_set_spd(9), sata_down_spd_limit(9), sata_link_hardreset(9), sata_std_hardreset(9), ata_slave_link_init(9), sata_lpm_ignore_phy_events(9), ata_ncq_prio_supported(9), ata_ncq_prio_enabled(9), ata_ncq_prio_enable(9), ata_change_queue_depth(9), ata_scsi_change_queue_depth(9), ata_sas_sdev_configure(9), ata_sas_queuecmd(9), sata_async_notification(9), ata_eh_read_log_10h(9), ata_eh_get_ncq_success_sense(9), ata_eh_analyze_ncq_error(9) πŸ‘‘


and that's the page bestie 🫢 cute little sign-off: this one lives in ./drivers/ata, dated October 2026, and it's filed under ata_qc_complete_multiple(9). periodt πŸ’œ

πŸ“¦ where this page comes from