scsi_get_vpd_page(9)
π 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
bufwith the data from that page and returns0. slay, success π - if the VPD page is not supported or its content cannot be retrieved,
-EINVALis 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 π
:
scsi_finish_command(9)scsi_change_queue_depth(9)scsi_track_queue_full(9)scsi_vpd_inquiry(9)scsi_get_vpd_buf(9)scsi_attach_vpd(9)scsi_report_opcode(9)scsi_cdl_check(9)scsi_cdl_enable(9)scsi_device_get(9)scsi_device_put(9)starget_for_each_device(9)__starget_for_each_device(9)__scsi_device_lookup_by_target(9)scsi_device_lookup_by_target(9)__scsi_device_lookup(9)scsi_device_lookup(9)
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
- 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