sata_link_scr_lpm(9)
π sata_link_scr_lpm(9) β like, the Kernel API Manual page you actually wanna read π
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:
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_set_spd_needed(9)sata_set_spd(9)sata_down_spd_limit(9)sata_link_hardreset(9)sata_std_hardreset(9)ata_qc_complete_multiple(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)
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
- 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