Blame SOURCES/0069-RH-make-parse_vpd_pg83-match-scsi_id-output.patch

b46d12
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
b46d12
From: Benjamin Marzinski <bmarzins@redhat.com>
b46d12
Date: Thu, 25 Mar 2021 13:05:10 -0500
b46d12
Subject: [PATCH] RH: make parse_vpd_pg83 match scsi_id output
b46d12
b46d12
Red Hat sets ID_SERIAL based on the result of scsi_id, instead of using
b46d12
the result of sg_inq and 55-scsi-sg3_id.rules. Make parse_vpd_pg83 match
b46d12
that.
b46d12
b46d12
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
b46d12
---
b46d12
 libmultipath/discovery.c | 18 ++----------------
b46d12
 1 file changed, 2 insertions(+), 16 deletions(-)
b46d12
b46d12
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
b46d12
index 5e988631..2404cb87 100644
b46d12
--- a/libmultipath/discovery.c
b46d12
+++ b/libmultipath/discovery.c
b46d12
@@ -1079,12 +1079,9 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
b46d12
 				naa_prio = 7;
b46d12
 				break;
b46d12
 			case 2:
b46d12
-				/* IEEE Extended: Prio 6 */
b46d12
-				naa_prio = 6;
b46d12
-				break;
b46d12
 			case 3:
b46d12
-				/* IEEE Locally assigned: Prio 1 */
b46d12
-				naa_prio = 1;
b46d12
+				/* IEEE Extended or Locally assigned: Prio 6 */
b46d12
+				naa_prio = 6;
b46d12
 				break;
b46d12
 			default:
b46d12
 				/* Default: no priority */
b46d12
@@ -1103,17 +1100,6 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len,
b46d12
 				vpd = d;
b46d12
 			}
b46d12
 			break;
b46d12
-		case 0x8:
b46d12
-			/* SCSI Name: Prio 3 */
b46d12
-			if (memcmp(d + 4, "eui.", 4) &&
b46d12
-			    memcmp(d + 4, "naa.", 4) &&
b46d12
-			    memcmp(d + 4, "iqn.", 4))
b46d12
-				break;
b46d12
-			if (prio < 3) {
b46d12
-				prio = 3;
b46d12
-				vpd = d;
b46d12
-			}
b46d12
-			break;
b46d12
 		case 0x1:
b46d12
 			/* T-10 Vendor ID: Prio 2 */
b46d12
 			if (prio < 2) {
b46d12
-- 
b46d12
2.17.2
b46d12