sata_pmp_read_gscr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sata_pmp_read_gscr β€” read GSCR block of SATA PMP

okay so this is a page from the Kernel API Manual, bestie β€” section 9, and the star of the show is sata_pmp_read_gscr. it lives over in ./drivers/ata, and the version vibes are dated October 2026. let's get into it 🫢


✨ SYNOPSIS ✨

int sata_pmp_read_gscr(struct ata_device *dev, u32 *gscr);

like, that's the whole signature. two args, one int coming back at you. iconic. 🌸


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the PMP device. yeah, that one. the port multiplier we're gossiping about πŸ’…
  • gscr β€” the buffer you're reading the GSCR block into. it's the lil landing pad for all the data, no cap πŸ›¬

πŸ’– DESCRIPTION πŸ’–

so what does it actually do? it reads the selected PMP GSCRs from the PMP sitting at dev. and why do we care? because those GSCRs serve as the configuration and identification info for the PMP. basically the PMP's whole personality, handed to you. ✨

πŸ”’ LOCKING: Kernel thread context (may sleep). like, it's allowed to nap, bestie β€” do not call this from a context that can't handle sleeping. fr fr 😴

⭐ RETURN ⭐

  • 0 on success β€” slay, we ate πŸ’…
  • -errno on failure β€” something went sideways, and the error code tells you what πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/ata/libata-pmp.c, plus the whole friend group:


and that's the page!! 🌈 source dir is ./drivers/ata, dated October 2026, and the page name is sata_pmp_read_gscr(9) in case you forgot already πŸŽ€πŸ’œ go read some GSCRs, bestie, you've got this πŸ‘‘βœ¨

πŸ“¦ where this page comes from