Scroll to navigation

SCSI_GET_VPD_PAGE(9) SCSI mid layer SCSI_GET_VPD_PAGE(9)

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

struct scsi_device * sdev

The device to ask

u8 page

Which Vital Product Data to return

unsigned char * buf

where to store the VPD

int buf_len

number of bytes in the VPD buffer area

DESCRIPTION

SCSI devices may optionally supply Vital Product Data. Each 'page' of VPD is defined in the appropriate SCSI document (eg SPC, SBC). If the device supports this VPD page, this routine returns a pointer to a buffer containing the data from that page. The caller is responsible for calling kfree on this pointer when it is no longer needed. If we cannot retrieve the VPD page this routine returns NULL.

AUTHORS

James Bottomley <James.Bottomley@hansenpartnership.com>

Author.

Rob Landley <rob@landley.net>

Author.

COPYRIGHT

July 2017 Kernel Hackers Manual 4.12