[SCSI] Don't attempt to send extended INQUIRY command if skip_vpd_pages is set

If a device has the skip_vpd_pages flag set we should simply fail the
scsi_get_vpd_page() call.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Stuart Foster <smf.linux@ntlworld.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>

authored by Martin K. Petersen and committed by James Bottomley 7562523e e09056b2

Changed files
+3
drivers
scsi
+3
drivers/scsi/scsi.c
··· 1031 1031 { 1032 1032 int i, result; 1033 1033 1034 + if (sdev->skip_vpd_pages) 1035 + goto fail; 1036 + 1034 1037 /* Ask for all the pages supported by this device */ 1035 1038 result = scsi_vpd_inquiry(sdev, buf, 0, buf_len); 1036 1039 if (result)