sata_link_scr_lpm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, buckle up β€” this is sata_link_scr_lpm from the Kernel API Manual, and it's lowkey just a little SControl glow-up function. Let's get into it. ✨


🌸 NAME 🌸

sata_link_scr_lpm β€” manipulate the SControl IPM and SPM fields πŸ’«


πŸ¦‹ SYNOPSIS πŸ¦‹

int sata_link_scr_lpm (struct ata_link *link , enum ata_lpm_policy
policy , bool spm_wakeup );

πŸŽ€ ARGUMENTS πŸŽ€

  • link β€” the ATA link whose SControl we're about to manipulate, bestie. That's the main character here.
  • policy β€” the LPM policy we're configuring. It's giving "set the vibe" energy.
  • spm_wakeup β€” initiate the LPM transition to the active state. Wakey wakey. ⏰

πŸ’– DESCRIPTION πŸ’–

So what this does is manipulate the IPM field of the SControl register of link according to policy. Simple, clean, iconic.

And if policy is ATA_LPM_MAX_POWER and spm_wakeup is true, then the SPM field gets manipulated to wake up the link. No cap, that's the whole trick.

Also, before returning, this function clears PHYRDY_CHG. Yes, she cleans up after herself. πŸ’…

LOCKING: EH context. That's the rule, don't @ me. πŸ”’

⭐ RETURN ⭐

0 on success, -errno otherwise. That's it, that's the whole return section. 🫢


🌈 SEE ALSO 🌈

Kernel file ./drivers/ata/libata-sata.c, plus the whole friend group:


Okay that's the page!! Straight from ./drivers/ata, dated October 2026 β€” so future-core of it, honestly. Go manipulate those SControl fields, bestie, you're literally gonna slay it. πŸ§šπŸ’œπŸ”₯

πŸ“¦ where this page comes from