sata_scr_read(9)
π sata_scr_read(9) β like, the Kernel API Manual bestie β¨
okay so this is a page from the Kernel API Manual, and it's all about sata_scr_read β a little function that goes and grabs an SCR register for you. tiny function, big main character energy π«Ά
πΈ NAME πΈ
sata_scr_read β read SCR register of the specified port
β¨ SYNOPSIS β¨
int sata_scr_read (struct ata_link *link , int reg , u32 *val );
π ARGUMENTS π
linkβ the ATA link you wanna read the SCR for, bestie π¦regβ which SCR you're reading (yes, you gotta pick one)valβ the place where the read value gets stored πΎ
π DESCRIPTION π
So what it does is: it reads the SCR register reg of link and drops it into *val. that's the whole vibe β¨
And like, here's the tea β this function is guaranteed to succeed if all of these are true at the same time:
linkisap->link- the cable type of the port is SATA
- the port implements
->scr_read
all three or it's not a promise, periodt π
LOCKING: None if link is ap->link. Kernel thread context otherwise. π
π₯ RETURN π₯
0 on success, negative errno on failure. that's it, that's the return π
ngl a negative errno is never a slay, but at least you know where you stand π
π SEE ALSO π
Kernel file ./drivers/ata/libata-sata.c plus this whole friend group right here:
sata_scr_valid(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_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)
and that's the whole page, no cap π§ this little masterpiece lives in the source tree at ./drivers/ata and it's dated October 2026 β so yeah, future vibes only π bye bestie, go read some registers π¦
π¦ 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