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

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