scsi: rescan VPD attributes

The VPD page information might change, so we need to be able to update
it. This patch implements a VPD page rescan whenever the 'rescan' sysfs
attribute is triggered.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Shane Seymour <shane.seymour@hpe.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Hannes Reinecke
2015-11-09 13:24:28 +01:00
committed by Martin K. Petersen
parent fe0798c5e1
commit 09e2b0b146
5 changed files with 39 additions and 10 deletions

View File

@@ -109,6 +109,7 @@ struct scsi_device {
char type;
char scsi_level;
char inq_periph_qual; /* PQ from INQUIRY data */
struct mutex inquiry_mutex;
unsigned char inquiry_len; /* valid bytes in 'inquiry' */
unsigned char * inquiry; /* INQUIRY response data */
const char * vendor; /* [back_compat] point into 'inquiry' ... */
@@ -117,9 +118,9 @@ struct scsi_device {
#define SCSI_VPD_PG_LEN 255
int vpd_pg83_len;
unsigned char *vpd_pg83;
unsigned char __rcu *vpd_pg83;
int vpd_pg80_len;
unsigned char *vpd_pg80;
unsigned char __rcu *vpd_pg80;
unsigned char current_tag; /* current tag */
struct scsi_target *sdev_target; /* used only for single_lun */