ata_sff_busy_wait(9)
π ata_sff_busy_wait(9) β like, the actual kernel API manual, bestie
okay so real talk: this page lives in the Kernel API Manual, section 9, and it's all about ata_sff_busy_wait β the little function that sits there refreshing a port's status register until the bits you care about finally go β¨quietβ¨. Honestly? Iconic behaviour. Let's get into it π
πΈ NAME πΈ
ata_sff_busy_wait β wait for a port status register π«Ά
Like, that's the whole job. It waits. On a status register. For a port. Slay.
β SYNOPSIS β
u8 ata_sff_busy_wait (struct ata_port *ap , unsigned int bits , unsigned
int max );
Note the return type, bestie: u8. Not void, not int, u8. And yeah, the line breaks in the middle of unsigned int max are exactly how the original has it β we don't touch the signature, ever. Periodt π
π¦ ARGUMENTS π¦
apβ the port you're waiting on. That's the vibe. This is your main character port. πbitsβ the bits that must be clear. Read that again: clear, not set. We are waiting for these to go bye-bye. π§maxβ how many10uSwaits you're willing to perform. So it's a loop count, basically βmaxlittle ten-microsecond chunks of patience. π
π DESCRIPTION π
It waits up to max*10 microseconds for the selected bits in the port's status register to be cleared. That's the whole plot. Then it returns the final value of the status register β the final one, like the last word in the argument. π
So yes: max Γ 10uS, that's your ceiling, and no cap, it really does hand you back the live status register value at the end so you can see what happened. π₯
π LOCKING π
Locking is inherited from the caller. Translation: this function isn't out here grabbing locks for you, bestie β whatever locking situation you rolled in with is the locking situation you've got. Not me doing your lock management. π
π SEE ALSO π
Kernel file ./include/linux/libata.h plus this little friend group right here, fr fr:
Go read those too, they're giving linked-list energy. β
okay that's the page!! π cute little sign-off as promised: this one comes from ./include/linux, dated October 2026, printed under the title ata_sff_busy_wait(9) in the Kernel API Manual. Go wait on some bits, bestie β you've got this π«Άβ¨π
π¦ 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