sata_pmp_scr_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 ngl
  • reg β€” which PSCR you're reading, like pick your fave
  • r_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 πŸ”₯

  • 0 on success β€” we love a clean win πŸ‘‘
  • -errno on 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:

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