ata_eh_link_set_lpm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, so this one's a kernel function from the Kernel API Manual (the 9 section, obviously β€” we're in kernel-land now 🧚) and honestly? it's giving "let me handle the power stuff so you don't have to" energy. it lives in the kernel file ./drivers/ata/libata-eh.c and it's all about configuring SATA interface power management. slay. πŸ’–


✨ SYNOPSIS ✨

int ata_eh_link_set_lpm (struct ata_link *link , enum ata_lpm_policy
policy , struct ata_device **r_failed_dev );

like yes, three args, super chill, no cap. 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • link β€” the link you wanna configure, bestie. that's the main character right there πŸ‘‘
  • policy β€” the link power management policy. this is the vibe you're setting, pick wisely πŸ’…
  • r_failed_dev β€” out parameter for failed device. it's how the function tells you who fumbled the bag, if anyone did 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

so what it does: Enable SATA Interface power management. periodt. πŸ”₯

and then, specifically β€” this is the important bit, don't skip it β€” it will enable Device Interface Power Management (DIPM) for the min_power and medium_power_with_dipm policies. literally only those two, okay? those are the ones. 🌸

after that lil DIPM moment, it calls driver specific callbacks for enabling Host Initiated Power management. so it's like, "here's your DIPM, and now let me hand off to the driver-specific callback to do the HIPM part" 🀝

LOCKING: EH context. no like actually β€” EH context, that's the rule, do not come in here from anywhere else πŸ™ˆ

⭐ RETURN ⭐

  • 0 on success πŸ’š
  • -errno on failure πŸ’€

that's it, that's the whole return contract, we love a simple interface.


🌈 SEE ALSO 🌈

okay so the source of all this is Kernel file ./drivers/ata/libata-eh.c and then there is a whole friend group of related functions, iykyk. full list, no skips, here we go:


and that's the whole page, bestie πŸ’œ this little icon came out of ./drivers/ata, dated October 2026, and the manual name is the Kernel API Manual β€” so like, cite it properly and go configure some power management. mwah πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from