sata_pmp_scr_read(9)
πΈ NAME πΈ
sata_pmp_scr_read β bestie, this is the one that reads a PSCR π
(yes, that's the whole job, and it does it flawlessly, periodt)
So this is a page from the Kernel API Manual β like, actual kernel-level business, not your casual little userland script energy β¨
β¨ SYNOPSIS β¨
int sata_pmp_scr_read (struct ata_link *link , int reg , u32 *r_val );
Like, that's the whole signature. Look at it. Iconic. π
π ARGUMENTS π
linkβ the ATA link you wanna read the PSCR for π¦ this is the main character of the operation nglregβ which PSCR you're reading, like pick your faver_valβ the resulting value lands here, this is where the answer goes π«
π§ DESCRIPTION π§
Okay so the vibe is: read PSCR reg into r_val for link β that's it, that's the whole thing, lowkey elegant πΈ
And here's the important bit: this is to be called from ata_scr_read. So you don't just ring it up out of nowhere, it's got its little call-graph slot and it lives there, iykyk π
LOCKING: Kernel thread context (may sleep). So likeβ¦ it CAN sleep, bestie. Do not hit this from a context where sleeping is a crime π fr fr, that's the whole caveat.
π₯ RETURN π₯
0on success β we love a clean win π-errnoon failure β not the slay we wanted, but it tells you exactly what went wrong π
π SEE ALSO π
Kernel file ./drivers/ata/libata-pmp.c β like, the whole squad lives in there:
sata_pmp_read(9)sata_pmp_write(9)sata_pmp_qc_defer_cmd_switch(9)sata_pmp_scr_write(9)sata_pmp_set_lpm(9)sata_pmp_read_gscr(9)sata_pmp_attach(9)sata_pmp_detach(9)sata_pmp_same_pmp(9)sata_pmp_revalidate(9)sata_pmp_revalidate_quick(9)sata_pmp_eh_recover_pmp(9)sata_pmp_eh_recover(9)sata_pmp_error_handler(9)
Go read them too, they're all serving their own specific purpose and honestly? Obsessed. π
Alright bestie, that's the page π it came from ./drivers/ata, dated October 2026, and it's filed under sata_pmp_scr_read(9) β mwah, go read some PSCRs responsibly β¨π«Ά
π¦ 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