Skip to content

Commit 7562523

Browse files
martinkpetersenJames Bottomley
authored andcommitted
[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>
1 parent e09056b commit 7562523

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/scsi/scsi.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,9 @@ int scsi_get_vpd_page(struct scsi_device *sdev, u8 page, unsigned char *buf,
10311031
{
10321032
int i, result;
10331033

1034+
if (sdev->skip_vpd_pages)
1035+
goto fail;
1036+
10341037
/* Ask for all the pages supported by this device */
10351038
result = scsi_vpd_inquiry(sdev, buf, 0, buf_len);
10361039
if (result)

0 commit comments

Comments
 (0)