scsi_get_vpd_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– scsi_get_vpd_page(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ and today's main character is scsi_get_vpd_page β€” the little function that goes and asks a SCSI device for its Vital Product Data. it's giving very "let me just check your vibe real quick" πŸŽ€ lowkey essential, no cap.


✨ NAME ✨

scsi_get_vpd_page β€” Get Vital Product Data from a SCSI device πŸ¦‹


🌸 SYNOPSIS 🌸

int scsi_get_vpd_page (struct scsi_device *sdev , u8 page , unsigned
char *buf , int buf_len );

πŸŽ€ ARGUMENTS πŸŽ€

  • sdev β€” the device you're asking. like, who are we questioning today πŸ‘€
  • page β€” which Vital Product Data you want back. gotta be specific, bestie, there are pages πŸ’…
  • buf β€” where you're stashing the VPD once it arrives. the drop-off spot πŸ“¦
  • buf_len β€” how many bytes fit in that VPD buffer area. know your capacity fr fr

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: SCSI devices may optionally supply Vital Product Data. optionally, key word, so don't come for them if they don't 🫢

each 'page' of VPD is defined in the appropriate SCSI document (eg SPC, SBC). iykyk ✨

now the actual behavior, and this part matters so pay attention:

  • if the device supports this VPD page, this routine fills buf with the data from that page and returns 0. slay, success πŸ’–
  • if the VPD page is not supported or its content cannot be retrieved, -EINVAL is returned. not the vibe, but that's the deal 😭
ngl, -EINVAL is doing a lot of heavy lifting here β€” it covers both "page doesn't exist" and "couldn't get the content," so don't assume which one it is. πŸ‘‘

🌈 SEE ALSO 🌈

Kernel file ./drivers/scsi/scsi.c β€” and the whole friend group πŸ’…:


and that's the page, bestie 🧚 this one lives in ./drivers/scsi, dated October 2026 β€” go off, October 2026 πŸ‘‘ periodt πŸ’œ

πŸ“¦ where this page comes from