Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-05-11 08:50:18 +0200
committerHannes Reinecke <hare@suse.de>2016-05-11 08:50:21 +0200
commit35854e5dfe59e208a741750e5ec817ce7304d339 (patch)
treeabc2ffbab43843a6b240bb1419dd58ef9c4e5797
parentff9b6353ea331db1698699629cde9b42a7f8541f (diff)
scsi_lib: Decode T10 vendor IDs (bsc#977572).
-rw-r--r--patches.fixes/scsi_lib-Decode-T10-vendor-IDs.patch59
-rw-r--r--series.conf1
2 files changed, 60 insertions, 0 deletions
diff --git a/patches.fixes/scsi_lib-Decode-T10-vendor-IDs.patch b/patches.fixes/scsi_lib-Decode-T10-vendor-IDs.patch
new file mode 100644
index 0000000000..0e72beb36d
--- /dev/null
+++ b/patches.fixes/scsi_lib-Decode-T10-vendor-IDs.patch
@@ -0,0 +1,59 @@
+From: Hannes Reinecke <hare@suse.de>
+Date: Mon, 9 May 2016 09:14:29 +0200
+Subject: scsi_lib: Decode T10 vendor IDs
+Patch-Mainline: Queued in subsystem maintainer repo
+Git-commit: d230823a1c4c3e97afd4c934b86b3975d5e20249
+Git-repo: git://git.kernel.org/mkp/h/4.7/scsi-queue
+References: bsc#977572
+
+Some arrays / HBAs will only present T10 vendor IDs, so we should be
+decoding them, too.
+
+[mkp: Fixed T10 spelling]
+
+Suggested-by: Paul Mackerras <paulus@ozlabs.org>
+Signed-off-by: Hannes Reinecke <hare@suse.com>
+Tested-by: Paul Mackerras <paulus@ozlabs.org>
+Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+---
+ drivers/scsi/scsi_lib.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
+index 92fb930..30f4429 100644
+--- a/drivers/scsi/scsi_lib.c
++++ b/drivers/scsi/scsi_lib.c
+@@ -3200,6 +3200,7 @@ int scsi_vpd_lun_id(struct scsi_device *sdev, char *id, size_t id_len)
+ * - EUI-64 based 12-byte
+ * - NAA IEEE Registered
+ * - NAA IEEE Extended
++ * - T10 Vendor ID
+ * as longer descriptors reduce the likelyhood
+ * of identification clashes.
+ */
+@@ -3218,6 +3219,21 @@ int scsi_vpd_lun_id(struct scsi_device *sdev, char *id, size_t id_len)
+ goto next_desig;
+
+ switch (d[1] & 0xf) {
++ case 0x1:
++ /* T10 Vendor ID */
++ if (cur_id_size > d[3])
++ break;
++ /* Prefer anything */
++ if (cur_id_type > 0x01 && cur_id_type != 0xff)
++ break;
++ cur_id_size = d[3];
++ if (cur_id_size + 4 > id_len)
++ cur_id_size = id_len - 4;
++ cur_id_str = d + 4;
++ cur_id_type = d[1] & 0xf;
++ id_size = snprintf(id, id_len, "t10.%*pE",
++ cur_id_size, cur_id_str);
++ break;
+ case 0x2:
+ /* EUI-64 */
+ if (cur_id_size > d[3])
+--
+1.8.5.6
+
diff --git a/series.conf b/series.conf
index 0d3e2f7417..5106bfb15e 100644
--- a/series.conf
+++ b/series.conf
@@ -1576,6 +1576,7 @@
patches.fixes/scsi-trace-remove-service-action-definitions.patch
patches.fixes/scsi-trace-Decode-MAINTENANCE_IN-and-MAINTENANCE_OUT.patch
patches.fixes/scsi-trace-define-ZBC_IN-and-ZBC_OUT.patch
+ patches.fixes/scsi_lib-Decode-T10-vendor-IDs.patch
patches.suse/fcoe-reduce-max_sectors
patches.fixes/0001-libfc-replace-rp_mutex-with-rp_lock.patch