scsi: Rework the code for caching Vital Product Data (VPD)
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 29 Aug 2017 15:50:12 +0000 (08:50 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 30 Aug 2017 01:51:42 +0000 (21:51 -0400)
commit1e3f720a67c29e145321ed9b4ef7a83e6416d201
tree4fc8eb9428bb7fc8d5b3f888f64d00b63f260084
parent26e3e3cb05604073f2e9969fb0f06f35eb3b3313
scsi: Rework the code for caching Vital Product Data (VPD)

Introduce the scsi_get_vpd_buf() and scsi_update_vpd_page()
functions. The only functional change in this patch is that if updating
page 0x80 fails that it is attempted to update page 0x83.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Shane Seymour <shane.seymour@hpe.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Shane M Seymour <shane.seymour@hpe.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi.c