From: Hannes Reinecke <hare@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
	Hannes Reinecke <hare@suse.com>
Subject: [PATCH 2/2] scsi: vpd pages are mandatory for SPC-2
Date: Fri,  1 Apr 2016 08:57:37 +0200	[thread overview]
Message-ID: <1459493857-4724-3-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1459493857-4724-1-git-send-email-hare@suse.de>
VPD pages 0x0 and 0x83 are mandatory even for SPC-2, so we should
be lowering the restriction to avoid having to whitelist every
SPC-2 compliant device.
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 include/scsi/scsi_device.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 1d4a329..40a789f 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -541,9 +541,9 @@ static inline int scsi_device_supports_vpd(struct scsi_device *sdev)
 	/*
 	 * Although VPD inquiries can go to SCSI-2 type devices,
 	 * some USB ones crash on receiving them, and the pages
-	 * we currently ask for are for SPC-3 and beyond
+	 * we currently ask for are mandatory for SPC-2 and beyond
 	 */
-	if (sdev->scsi_level > SCSI_SPC_2 && !sdev->skip_vpd_pages)
+	if (sdev->scsi_level >= SCSI_SPC_2 && !sdev->skip_vpd_pages)
 		return 1;
 	return 0;
 }
-- 
2.6.2
next prev parent reply	other threads:[~2016-04-01  6:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  6:57 [PATCH 0/2] scsi: vpd sanity checks Hannes Reinecke
2016-04-01  6:57 ` [PATCH 1/2] scsi: Do not attach VPD to devices that don't support it Hannes Reinecke
2016-04-01  7:44   ` Johannes Thumshirn
2016-04-04 23:12   ` Martin K. Petersen
2016-04-01  6:57 ` Hannes Reinecke [this message]
2016-04-01  7:45   ` [PATCH 2/2] scsi: vpd pages are mandatory for SPC-2 Johannes Thumshirn
2016-04-11 21:23   ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=1459493857-4724-3-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).